ConvertTextToPaths

Content stream editing, Fonts

תיאור

כותב מחדש את הוראות הצגת הטקסט בעמודים הנבחרים בתור הפעלות Form XObject וקטוריות תוך שמירה על מיקומי הגליפים, ריווח הטקסט, מצב הכתיבה, הטרנספורמציות, צבע המילוי, צבע הקו והגדרות הקו

קווי-מתאר של גליפי TrueType ו-Type 1 מחולצים פעם אחת ונעשה בהם שימוש חוזר עבור גליפים חוזרים. ‏CharProcs של Type 3 מומרים ל-Form XObjects רגילים תוך שימור מטריצת הגופן, התיבה התוחמת והיקף המשאבים שלהם. את פקודות הצגת-הטקסט ובחירת-הגופן המקוריות מסיריםההמרה טרנזקציונית. כל שכבת תוכן נבחרת וכל Form מקונן מבוקש מנותחים ומומרים בזיכרון לפני שאובייקט PDF כלשהו משתנה. גופנים לא נתמכים, מצבי עיבוד חיתוך-טקסט 4 עד 7, מצב טקסט פגום והיקפי משאבים משותפים של Form עמומים נכשלים בלי לכתוב חלקית את המסמך מחדש

Converted text is no longer searchable, selectable, or extractable as text. It remains scalable vector content for rendering and printing

תחביר

Delphi

Function TPDFlib.ConvertTextToPaths(Const PageRange: WideString= ''; Options: Integer= PDF_TEXT_PATH_DEFAULT): Integer;

ActiveX

Function PDFlib::ConvertTextToPaths(PageRange As String, Options As Long) As Long

DLL

int DLConvertTextToPaths(int InstanceID, const wchar_t *PageRange, int Options);
int DLConvertTextToPathsA(int InstanceID, const char *PageRange, int Options);

פרמטרים

ערכים מוחזרים1 or greaterNumber of text-showing instructions converted0No eligible text was found, the range or options were invalid, or conversion failed. Inspect LastErrorCode to distinguish errors
PageRangePage range expression using one-based page numbers. An empty value selects every page
OptionsBitwise combination of PDF_TEXT_PATH_RECURSE_FORMS to convert nested Form XObjects and PDF_TEXT_PATH_PURGE_FONTS to remove source font resources that become unused. PDF_TEXT_PATH_DEFAULT enables both options

קודי שגיאה

506The source font cannot provide a supported vector glyph program
507LastErrorCode

508The text program, font state, or recursive Form resource scope is malformed or ambiguous

דוגמה

Converted := PDF.ConvertTextToPaths('1-3,5', PDF_TEXT_PATH_DEFAULT);
If (Converted= 0)and (PDF.LastErrorCode<> 0) Then
  raise Exception.Create(PDF.LastError);