THotPDF.RepairDiagnosticDocument Method

Repairs stream lengths and file-structure offsets in an edited diagnostic document without reserializing its object bodies

Declaration

class function RepairDiagnosticDocument(
  const SourceFile, TargetFile: TFileName;
  const Options: THPDFDiagnosticRepairOptions;
  out Report: THPDFDiagnosticRepairReport
): Boolean; static;

Parameters

NameMeaning
SourceFileExisting diagnostic PDF carrying the %QDF-1.0 marker
TargetFileDestination replaced atomically after successful validation
OptionsInput, object, verification, and password policy
ReportStructured status, counts, byte totals, offsets, and diagnostic text

Return value

Returns True only after repair succeeds and optional strict reload validation passes

Related API