THPDFDocumentHandlerOptions Record

THPDFDocumentHandlerOptions = record
  MaxArchiveEntries: Integer;
  MaxArchiveCompressedBytes, MaxArchiveExpandedBytes: Int64;
  MaxArchiveEntryBytes: Int64;
  MaxCompressionRatio, MaxPasswordAttempts, MaxResources: Integer;
  MaxResourceBytes, MaxTotalResourceBytes: Int64;
  MaxPages: Integer;
  MaxReflowCharacters: Int64;
  MaxReflowNodes, MaxReflowCSSRules: Integer;
  MaxReflowOperations, MaxRenderedPixels: Int64;
  MaxRenderDPI: Integer;
  MaxOutputBytes: Int64;
  ReflowPageWidth, ReflowPageHeight: Single;
  ReflowMargin, ReflowFontSize: Single;
  ImageDPI: Integer;
  CancellationToken: THPDFCancellationToken;
  ArchivePasswordCallback: THPDFArchivePasswordCallback;
  class function Default: THPDFDocumentHandlerOptions; static;
end;

Default provides finite archive, resource, reflow, page, render, output, and compression-ratio limits suitable for trusted application adjustment

All positive limits are validated before recognition, and the same options remain active through conversion, export, and rendering

MaxPasswordAttempts defaults to 3 and accepts values from 1 through 16

ArchivePasswordCallback receives the source name, encrypted entry name, and one-based attempt number; setting Handled to False declines the credential request

The built-in handlers support classic PKZIP ZipCrypto only, retain credentials and decoded entry bytes in memory, clear them between attempts, and fail closed for missing callbacks, invalid credentials, cancellation, or unsupported encryption

Optional Document Handlers