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 提供一組有限的封存、資源、reflow、頁面、渲染、輸出與壓縮比上限,適合受信任的應用程式自行調整
所有正數上限在識別前都會先驗證,同一組選項在轉換、匯出與渲染期間持續生效
MaxPasswordAttempts 預設 3,可接受 1 到 16
ArchivePasswordCallback 會收到來源名稱、加密條目名稱與從 1 起算的嘗試次數;把 Handled 設為 False 就拒絕這次憑證請求
內建處理器只支援傳統 PKZIP ZipCrypto,憑證與解出的條目位元組會留在記憶體中、每次嘗試之間清掉;遇到缺少 Callback、憑證無效、被取消或加密不支援時一律回報失敗