ExportAnnotationsToFDFString

Annotations and hotspot links

Description

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

Every page is visited and each exportable annotation becomes a single /Type /Annot entry in the FDF /Annots array, carrying /Subtype, /Rect, /Contents, the /T author label, /Subj and the 0-based /Page index so that an importer can route it back to the correct page

Syntax

Delphi

Function TPDFlib.ExportAnnotationsToFDFString: AnsiString;

Return values

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

Remarks

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

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

See also

ExportAnnotationsToFDF, ImportAnnotationsFromFDFString, ExportAnnotationsToXFDFString