TPDFlibRangeAvailabilityEvent
Data types, Document management, Progressive loading
Description
Reports whether a complete absolute byte range is already present in progressive storage without fetching it
Syntax
Delphi
TPDFlibRangeAvailabilityEvent= Function(Sender: TObject;
Offset: Int64; Count: LongInt): Integer Of Object;Parameters
| Sender | The TPDFlib instance that owns the callback-backed document |
|---|---|
| Offset | The absolute zero-based start offset |
| Count | The number of consecutive bytes being tested |
Return values
| 0 | One or more requested bytes are not yet present |
|---|---|
| Nonzero | Every requested byte can be read immediately without transport or blocking I/O |
Remarks
The callback is a status probe and must not fetch data, wait for a download or call back into the same range source
Results should progress monotonically as storage fills; cached bytes remain available even if the callback later reports zero
The callback target and backing storage must remain valid until the loaded document is closed