HPDFConvertLoadedToPDFA4PreservingFile Function

Unit: HPDFArchivalConversion

Create a validated PDF/A-4 file that retains original text and vector page content, with atomic target replacement after successful conversion and preservation checks

function HPDFConvertLoadedToPDFA4PreservingFile(Source: THotPDF;
  const TargetFileName: string; const SRGBProfile: TBytes;
  const Options: THPDFArchivalPreservationOptions;
  out Report: THPDFArchivalPreservationReport): Boolean;

This wrapper uses HPDFConvertLoadedToPDFA4Preserving to stage the complete document in an exclusive temporary file beside the target

It rejects aliases of the loaded source, flushes the temporary file, checks cancellation, and replaces the target with MoveFileEx using the replacement and write-through flags

Conversion, validation, preservation, cancellation, flush and replacement failures retain the existing target and remove the temporary output; the return value and Report.Conversion.Succeeded are false

Report.TextAndVectorContentPreserved is also cleared when publication fails, whilst diagnostic and validation evidence remains available

See the preservation profile for supported fonts and colours, appearance rules, explicit losses, cumulative stream-work budgets, publication guarantees and validation limits