THPDFRandomAccessSource Class

Abstract base class that lets THotPDF.LoadFromRandomAccessSource load a PDF from any caller-defined seekable byte store without requiring a TStream implementation

Declaration

THPDFRandomAccessSource = class
public
  function GetSize: Int64; virtual; abstract;
  function ReadAt(Offset: Int64; var Buffer;
    Count: Longint): Longint; virtual; abstract;
end;

Unit

HPDFDoc

Members

NamePurpose
GetSizeReturns the stable byte length of the backing store
ReadAtReads Count bytes starting at Offset into Buffer
IsRangeAvailableReports whether a range can be read without waiting for additional data
ReadAtCancellableProvides a cooperative cancellation path for remote or otherwise blocking reads
TransferAtWrites a source range to a destination stream with a bounded fallback implementation

Usage notes

Related APIs