IHPDFHandledDocument Interface

IHPDFHandledDocument = interface(IInterface)
  function GetFormat: THPDFHandledDocumentFormat;
  function GetHandlerName: string;
  function GetPageCount: Integer;
  function GetPageSourceName(PageIndex: Integer): string;
  function WritePDF(Destination: TStream;
    const Options: THPDFDocumentHandlerOptions;
    out Info: THPDFDocumentHandlerInfo): boolean;
  function RenderPage(PageIndex, DPI: Integer;
    const Options: THPDFDocumentHandlerOptions; out Bitmap: TBitmap;
    out Info: THPDFDocumentHandlerInfo): boolean;
end;

不可变的句柄化文档在调用方释放源流之后,仍保留生成的 PDF 字节和源页面的来源信息

WritePDF 从缓存发布,并在可 seek 的目标上支持回滚;RenderPage 则在分配结果位图之前先应用 DPI 和像素限制

可选文档处理器