ExportAnnotationsToFDFString

Annotations and hotspot links

Description

Serialises the annotations of the loaded document into an FDF document string, the same shape Acrobat writes for its Export Comments to FDF command

Every page is walked and each exportable annotation becomes one /Type /Annot entry inside the FDF /Annots array carrying /Subtype, /Rect, /Contents, the /T author label, /Subj and the 0-based /Page index so an importer can route it back to the right page

Syntax

Delphi

Function TPDFlib.ExportAnnotationsToFDFString: AnsiString;

Return values

FDF textThe complete FDF document as an AnsiString from the %FDF-1.2 header through %%EOF; a document without exportable annotations still yields a valid envelope with an empty /Annots array
''No document is loaded

Remarks

Widget annotations and annotations without a /Subtype are skipped, empty text values are omitted rather than written as empty strings, and string contents are PDF-escaped

The /Rect values are the ones GetAnnotRectEx reports, so they follow the current coordinate origin and unit scale, and the selected page is restored before the call returns

See also

ExportAnnotationsToFDF, ImportAnnotationsFromFDFString, ExportAnnotationsToXFDFString