THPDFLinearizedPageRangePlan Record
The byte-range plan for progressively reading one page of a linearized file: status and diagnostic, parsed header offsets, page object facts, hint stream placement, shared-group facts, transfer totals and the ordered byte ranges
Declaration
THPDFLinearizedPageRangePlan= record
Status: THPDFLinearizedPagePlanStatus;
FileLength: Int64;
PageIndex: Integer;
FirstPageIndex: Integer;
PageCount: Integer;
FirstPageEndOffset: Int64;
MainXRefOffset: Int64;
PageObjectNumber: Integer;
PageObjectCount: Integer;
PageOffset: Int64;
PageLength: Int64;
PrimaryHintOffset: Int64;
PrimaryHintLength: Int64;
OverflowHintOffset: Int64;
OverflowHintLength: Int64;
SharedGroupCount: Integer;
CrossReferenceEntryCount: Integer;
HintBytesDecoded: Int64;
RequiredBytes: Int64;
TransferRatio: Double;
RangeCount: Integer;
DependencyRangeCount: Integer;
AllRangesAvailable: boolean;
UsesCrossReferenceStream: boolean;
HintEncoding: THPDFLinearizedHintEncoding;
Ranges: THPDFLinearizedByteRangeArray;
DependencyRanges: THPDFLinearizedByteRangeArray;
Diagnostic: AnsiString;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Status | THPDFLinearizedPagePlanStatus outcome: ready, not linearized, unsupported cross-reference, limits exceeded or ranges unavailable |
FileLength | Total size of the source being planned |
PageIndex | Requested zero-based page, or -1 for bootstrap plans that cover the header alone |
FirstPageIndex / PageCount | First-page index and page count taken from the linearization header |
FirstPageEndOffset / MainXRefOffset | Header's /E and /T values: the end of the first-page section and the offset of the main cross-reference |
PageObjectNumber / PageObjectCount | Object number of the requested page and the number of objects in its object list |
PageOffset / PageLength | Byte range covered by the page's section in the file |
PrimaryHintOffset / PrimaryHintLength | Placement of the primary hint stream |
OverflowHintOffset / OverflowHintLength | Placement of the overflow hint stream, zero and empty when there is no such stream |
SharedGroupCount / CrossReferenceEntryCount | Shared-object groups planned for the page and cross-reference entries covered by the plan |
HintBytesDecoded | Hint payload bytes actually decoded whilst building the plan |
RequiredBytes | Total bytes that have to transfer to render the page |
TransferRatio | RequiredBytes divided by FileLength; zero when planning did not succeed |
RangeCount / DependencyRangeCount | Number of entries in Ranges and in DependencyRanges |
AllRangesAvailable | true when all of the planned ranges are present in the random-access source |
UsesCrossReferenceStream | true when the plan was built against a cross-reference stream instead of a classic table |
HintEncoding | THPDFLinearizedHintEncoding layout spotted in the hint streams |
Ranges | Ordered byte ranges to fetch for the requested page, bootstrap and cross-reference ranges included as set by the options |
DependencyRanges | Byte ranges for the shared objects the page depends upon |
Diagnostic | Fail-closed reason text when Status reports a failure |
Usage notes
- Request one per page from
THotPDF.PlanProgressiveLinearizedPageRanges; checkStatusbefore placing trust in any other field - Fetch
Rangesfirst for the fastest first paint, thenDependencyRangesas shared objects are needed; the redraw scheduler consumes the plan in precisely this order - Use
TransferRatioandRequiredBytesto estimate bandwidth requirements before committing to progressive delivery