ExportDocumentRTFA

Text extraction and conversion

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to ExportDocumentRTF and string arguments are interpreted using the current SetAnsiMode code page

Extracts the whole document (or a page range) into a self-contained RTF document built on the same structured text model as the DOCX and Markdown writers: detected headings become bold styled headings with scaled sizes, paragraphs keep span-level fonts, sizes and colours through a shared font and colour table, and detected tables become bordered table rows

Pages are separated by page breaks; options accept PDF_RTF_DETECT_HEADINGS (1) and PDF_RTF_PRESERVE_STYLES (2), zero selecting both

Syntax

Delphi

Function DLExportDocumentRTFA(InstanceID: Integer; PageRange: PAnsiChar; Options: Integer): PAnsiChar;

DLL

const char* DLExportDocumentRTFA(int InstanceID, const char* PageRange, int Options);

Return values

RTFThe complete RTF document as a WideString
EmptyValidation, cancellation or extraction failed; LastErrorCode carries the reason

See also

ExportPageRTF, ExportDocumentMarkdown, SaveDOCXToStream