GetRangeSourceDataAvailability
Document management, Progressive loading, Diagnostics
Description
Determines whether the selected callback-backed PDF has all bytes needed to process a page, the interactive form or an indirect-object dependency graph
Syntax
Delphi
Function TPDFlib.GetRangeSourceDataAvailability(DataKind, Index: Integer;
Out Report: WideString): Integer;Parameters
| DataKind | PDF_RANGE_DATA_PAGE, PDF_RANGE_DATA_FORM or PDF_RANGE_DATA_OBJECT |
|---|---|
| Index | A one-based page number, zero for the form query, or an indirect object number |
| Report | Receives a JSON dependency and byte-range report |
Return values
PDF_RANGE_DATA_ERROR (-1) | The arguments, source or PDF structure are invalid; inspect LastErrorCode and Report |
|---|---|
PDF_RANGE_DATA_NOT_AVAILABLE (0) | At least one required range is not yet available |
PDF_RANGE_DATA_AVAILABLE (1) | The complete dependency graph is available |
PDF_RANGE_DATA_NOT_PRESENT (2) | The form query completed and the document has no AcroForm |
Report fields
scope, index, status, available | Identify the query and summarise its result |
|---|---|
dependencyGraphComplete | Indicates whether every reachable dependency was inspected |
requestedObjects, resolvedObjects, traversedObjects | Object-resolution counters for diagnostics and scheduling |
requiredBytes, missingBytes | Deduplicated byte totals after overlapping ranges are merged |
requiredRanges, missingRanges | Arrays of inclusive start and end source offsets |
error | An optional machine-readable structural or argument error |
Remarks
The page query follows only the target page-tree path, page resources, content streams, annotations and inherited page attributes. The form query walks
The form query walks AcroForm dependencies and requires Index to be zero
The object query starts at the supplied cross-reference object number and follows reachable indirect references while avoiding parent back edges
Missing ranges are never read; ranges reported as available may be parsed and added to the byte-range cache
Object count and dependency depth are bounded to reject hostile or cyclic structures predictably