THPDFDocumentHandlerOptions Record

THPDFDocumentHandlerOptions = record
  MaxArchiveEntries: Integer;
  MaxArchiveCompressedBytes, MaxArchiveExpandedBytes: Int64;
  MaxArchiveEntryBytes: Int64;
  MaxCompressionRatio, 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;
  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 默认为 3,接受 1 到 16 的值

ArchivePasswordCallback 接收源名称、加密条目名称和从 1 开始的尝试序号;把 Handled 设为 False 即拒绝该凭据请求

内建处理器只支持经典 PKZIP ZipCrypto,凭据和解码条目字节保留在内存中,尝试之间会被清理;缺失回调、凭据无效、取消或加密不受支持时 fail closed

Optional Document Handlers