THPDFLinearizationValidationInfo Record
Per-part verdicts for a linearized source: linearization dictionary, first-page section, page-offset hints and shared-object hints, plus the parsed header values and a diagnostic string
Declaration
THPDFLinearizationValidationInfo= record
DictionaryValid: boolean;
FirstPageSectionValid: boolean;
PageOffsetHintsValid: boolean;
SharedObjectHintsValid: boolean;
FirstPageObjectNumber: Integer;
PageCount: Integer;
HintOffset: Int64;
HintLength: Int64;
FirstPageEndOffset: Int64;
MainXRefOffset: Int64;
Valid: boolean;
Diagnostic: AnsiString;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
DictionaryValid | true when the /L, /O, /E, /N, /T, and /H dictionary entries parse and their ranges remain consistent with the file size |
FirstPageSectionValid | true when the first-page object section checks out, the declared end offset included |
PageOffsetHintsValid | true when the page-offset hint stream decodes and its values agree with the document |
SharedObjectHintsValid | true when the shared-object hint stream decodes and its values agree with the document |
FirstPageObjectNumber | Object number parsed from the dictionary's /O entry |
PageCount | Page count parsed from the dictionary's /N entry |
HintOffset / HintLength | Byte range of the primary hint stream from the dictionary's /H entry |
FirstPageEndOffset | End offset of the first-page section from the dictionary's /E entry |
MainXRefOffset | Offset of the main cross-reference table from the dictionary's /T entry |
Valid | Overall verdict, true only when every part-specific check passed; mirrors the result of the function |
Diagnostic | Fail-closed reason text naming the first check that did not pass |
Usage notes
- Filled by
THotPDF.ValidateLinearizedSourcefor anyTHPDFRandomAccessSource; validation stops at the first part that fails and records the reason inDiagnostic - Use the per-part flags to separate a broken hint stream from a broken dictionary before deciding whether progressive loading can be considered safe
- The parsed header values are populated as soon as the dictionary checks pass, even when later hint checks fail