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

SenderThe TPDFlib instance that owns the callback-backed document
OffsetThe absolute zero-based start offset
CountThe number of consecutive bytes being tested

Return values

0One or more requested bytes are not yet present
NonzeroEvery 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