TPDFlibRangeReadEvent

Data types, Document management

Description

Defines the synchronous callback used by LoadFromRangeSource to read an absolute byte range from caller-managed storage

Syntax

Delphi

TPDFlibRangeReadEvent= Function(Sender: TObject; Offset: Int64;
  Buffer: Pointer; Count: LongInt): LongInt Of Object;

Parameters

SenderThe TPDFlib instance requesting data
OffsetThe absolute zero-based source byte offset
BufferThe destination for at most Count bytes
CountThe maximum requested byte count

Return value

Return the number of bytes copied, from zero through Count; values outside that range are clamped

Remarks

The handler must remain assigned and its backing storage must remain valid for the lifetime of the loaded document