THPDFWindowsFormDataTransaction.ImportAnnotations

procedure ImportAnnotations(const Bytes: SysUtils.TBytes;
  const Options: THPDFHeadlessXFDFOptions; const Password: AnsiString);

Prepare one independent candidate that appends the mapped XFDF annotations to the authenticated current PDF graph

Options.CancellationToken must be nil or equal to the transaction token; supply the authenticated password again for encrypted input

Use WritePreparedPDF to copy the candidate and TakeCandidate only after all required publication steps succeed; failure and cancellation leave the borrowed document unchanged

The transaction can prepare only one candidate; ChangedAnnotations reports appended annotations and an empty import retains exact current bytes

See Windows annotation exchange and transaction ownership