IHPDFDocumentHandler Interface

IHPDFDocumentHandler = interface(IInterface)
  function GetHandlerName: string;
  function GetFormat: THPDFHandledDocumentFormat;
  function GetExtensions: string;
  function GetMIMETypes: string;
  function Recognize(const Probe: THPDFDocumentProbe): Integer;
  function Open(Source: TStream; const Probe: THPDFDocumentProbe;
    const Options: THPDFDocumentHandlerOptions;
    out Document: IHPDFHandledDocument;
    out Info: THPDFDocumentHandlerInfo): boolean;
end;

Recognize 返回 0 到 100 之间的分数,使强检查内容证据可以胜过弱的扩展名或 MIME 提示

Open 必须遵循提供的选项,保留调用方对源流的所有权,并且只在成功转换后发布不可变的已处理文档

THPDFDocumentHandlerRegistry Class