THotPDF.LoadFromRandomAccessSource

Loads a PDF through a caller-defined seekable byte source without requiring a TStream implementation

Declarations

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

function LoadFromRandomAccessSource(
  Source: THPDFRandomAccessSource;
  OwnsSource: Boolean = False): Integer; overload;

function LoadFromRandomAccessSource(
  Source: THPDFRandomAccessSource;
  const Password: AnsiString;
  OwnsSource: Boolean = False): Integer; overload;

Contract

The result is the loaded page count, matching LoadFromFile and LoadFromStream

See also: Scalable Loading, LoadFromStream