HPDFXFDFImportAnnotations function
function HPDFXFDFImportAnnotations(const Access: THPDFXFDFAccess;
const Destinations: THPDFXFDFDestinationAccess;
Root: THPDFXFDFNode): Integer; overload;
Map annotation XML through the supplied access callbacks and return the created annotation count
The separate destination callbacks bind local page arrays to actual indirect document pages and preserve named Unicode targets and exact bounded decimal coordinates
The original overload retains its signature and uses an empty destination record; explicit page targets require page-count and page-object callbacks
This low-level callback mapper does not provide whole-document rollback by itself; use SaveAnnotationsXFDFToFile for bounded admission, authenticated policy and atomic file publication
Destination attributes and limits
Standard stamp appearance transport preserves actual Form streams and bounded acyclic font, image and graphics resources through base64 typed XML
function HPDFXFDFImportAnnotations(const Access: THPDFXFDFAccess;
const Destinations: THPDFXFDFDestinationAccess; Root: THPDFXFDFNode;
MaxAppearanceBytes, MaxAppearanceNodes, MaxAppearanceDepth: Integer;
MaxAppearanceWorkingBytes: Int64;
CancellationToken: THPDFCancellationToken): Integer; overload;
Limits are positive and cumulative, with an appearance depth ceiling of 62; the previous overload supplies 16 MiB, 100000 nodes, depth 62 and 512 MiB of working reservation
Created indirect streams remain owned by the supplied graph adapter; the low-level codec does not take ownership of the caller's document and does not provide whole-operation rollback
The adapter reserves the original base64 length, including whitespace, before ANSI conversion and decoded storage; RAW HEX and ASCII data are reserved before allocating stream byte arrays
Working reservations are conservative and cumulative for the complete import, independent of output bytes; a caller-owned parsed XFDF tree is admitted by the caller before this adapter consumes it
A lexical preflight reserves decoded XML node and attribute records and inherited namespace scope arrays before constructing the tree; node count, depth and working storage are independent cumulative limits
The AP-specific preflight validates the existing object tag vocabulary before invoking the shared XML reader, preserving invalid-type rejection without retaining unrelated XHTML RawXML fragments