ConvertTextToPathsA

Content stream editing, Fonts

Description

ANSI variant of ConvertTextToPaths

Accepts string parameters as ANSI text and otherwise behaves identically to the wide-string entry point

Syntax

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);

Return values

1 or greaterNumber of text-showing instructions converted
0No eligible text was found, the range or options were invalid, or conversion failed. Inspect LastErrorCode to distinguish errors

Error codes

506The source font cannot provide a supported vector glyph program
507A text clipping rendering mode requires a clipping path that cannot be represented by an independent glyph Form
508The text program, font state, or recursive Form resource scope is malformed or ambiguous

Example

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