THotPDF.SaveLoadedDocumentDiagnostic
Writes a content-preserving diagnostic PDF with stable dictionary ordering, classic xref tables, and unpacked indirect objects
Declaration
procedure SaveLoadedDocumentDiagnostic(
const TargetFile: TFileName
);
Output contract
- Adds a
%QDF-1.0diagnostic marker after the PDF binary marker - Preserves encoded stream payload bytes and their filters
- Disables linearization, xref streams, and object streams for inspection
- Restores all caller output options after the save completes
- Pairs with
RepairDiagnosticDocumentafter hand editing so stream lengths, xref rows, the trailer, andstartxrefdo not need manual maintenance
See also: Editable Diagnostic Documents and Repair, RepairDiagnosticDocument, SaveLoadedDocument, DeterministicDictionaryOrder