SetTextExtractionOptions

טקסט, חילוץ

תיאור

מגדירה אפשרויות שונות שמשפיעות על פונקציונליות חילוץ הטקסט

החל מ-8.13 פונקציה זו מגדירה את אפשרויות חילוץ הטקסט עבור המסמך הנבחר בלבד; היא גם משפיעה רק על תוצאות ה-GetPageText

function.

כדי להתאים את חילוץ הטקסט עבור הפונקציות ExtractFilePageText ו-DAExtractPageText, השתמשו ב-DASetTextExtractionOptions החדש

function.

תחביר

Delphi

Function TPDFlib.SetTextExtractionOptions(OptionID, NewValue: Integer): Integer;

ActiveX

Function PDFlib::SetTextExtractionOptions(OptionID As Long, NewValue As Long) As Long

DLL

int DLSetTextExtractionOptions(int InstanceID, int OptionID, int NewValue);

פרמטרים

OptionID1 = התעלמות משינויי גופן כדי לאפשר קיבוץ בלוקים שונים יחד 2 = התעלמות משינויי צבע כדי לאפשר קיבוץ בלוקים שונים יחד 3 = התעלמות משינויי בלוק טקסט כדי לאפשר קיבוץ בלוקים שונים יחד 4 = פלט ערכי צבע CMYK 5 = מיון בלוקי טקסט לפי מיקום שמאל עליון 6 = התחתיות (descenders) ממדדי הגופן 7 = התעלמות מחפיפות 8 = התעלמות מכפילויות 9 = פיצול על רווח כפול 10 = חיתוך תווים מחוץ לאזור 11 = התאמת בלוקים חלופית 12 = התעלמות מבלוקי טקסט מסובבים 13 = חיתוך רווחים בתחילתם ובסופם של בלוקי טקסט 14 = פלט תווים לא ASCII מתחת לתו רווח (0x32) 15 = הסרת מחרוזות תווים מסוימות כמו קווי קו תחתון (ראו להלן)
NewValueFor OptionID = 1, 2, 3 and 6: 0 = Use, 1 = Ignore For OptionID = 4: 0 = Show as RGB (default), 1 = Show as CMYK For OptionID = 5: 0 = Do not sort blocks (default), 1 = Sort blocks For OptionID = 7, 8 and 12: 0 = Do not ignore, 1 = Ignore OptionID = 9: 0 = Do not split on double space (default) 1 = Split on double space OptionID = 10: 0 = Do not trim characters outside area (default) 1 = Trim characters outside area OptionID = 11: 0 = Regular block matching 1 = Alternative block matching OptionID = 13: 0 = Do not trim leading or trailing whitespace 1 = Trim leading and trailing whitespace OptionID = 14 0 = Remove non ASCII chracters below space character from output (default) 1 = Output raw unfiltered ASCII characters OptionID = 15 0 = Output text lines made with Underscore characters (default) 1 = Remove text lines made with Underscore characters OptionID = 16 0 = Keep hyphens at line ends (default) 1 = Re-join words hyphenated across line breaks in the line-oriented outputs (GetPageText modes 7 and 9); a lowercase continuation drops the hyphen and the break, capitalised or numeric continuations keep them OptionID = 17 0 = Leave show-text runs as painted (default) 1 = Re-split spaceless show-text runs into words at advance steps much wider than the run's median glyph advance (GetPageText modes 7 and 9-11), so documents that paint whole lines as one operator with kerning gaps instead of spaces still split into words OptionID = 18 0 = Extract rotated runs in page coordinates (default) 1 = Rotate runs painted at 90, 180 or 270 degrees into the horizontal reading frame and group each quarter turn separately, so rotated margin notes, table headers and axis labels extract as readable lines instead of interleaving with the upright text; OptionID 12 still wins where both are set

ערכי החזרה

0הפרמטר OptionID או NewValue אינו תקין
1אפשרות חילוץ הטקסט הוגדרה בהצלחה