property CharacterIsHyphen[Index: Integer]: Boolean; // read only
| Index | Geçerli sayfada sıfır tabanlı karakter indeksi; aralık CharacterCount - 1'e kadar |
CharacterIsHyphen returns True when PDFium classifies the
character at Index as a soft (line-break) hyphen rather than a regular hyphen
that belongs to a compound word. The classification is heuristic: it looks at the
character's Unicode code point, the line-end position, and the proximity of the
following text run to decide whether the hyphen should be kept when joining lines.
Yumuşak tireler, dizgi motorları (LaTeX, Word, InDesign) tarafından uzun kelimeleri satırlara bölmek için
eklenir. Bir PDF görüntüleyiciden metin kopyaladığınızda yumuşak tire tipik olarak düşer; böylece "high-
way"
high-way yerine highway olarak yapıştırılır. Bu property, kendi ayıklama kodunuzun bu
davranışı yeniden üretmesini sağlar
Property, satır sonuna denk gelen normal bir tire-minus (U+002D) ile Unicode yumuşak tireri (U+00AD) arasındaki
farkı ayrı tutmaz — bu durumlarda ikisi de True bildirir. Yalnızca
U+00AD durumunu istiyorsanız Character[Index]
ile doğrudan karşılaştırın
False bildirir; satır sonundaki aynı tire True bildirir
// Reconstruct words across line wraps, dropping soft hyphens
var
I: Integer;
S: WString;
begin
S := '';
for I := 0 to Pdf.CharacterCount - 1 do
if not Pdf.CharacterIsHyphen[I] then
S := S + Pdf.Character[I];
Memo1.Text := S;
end;