THPDFDocumentHandlerRegistry Class
THPDFDocumentHandlerRegistry = class
function RegisterHandler(const Handler: IHPDFDocumentHandler;
ReplaceExisting: boolean = false): boolean;
function UnregisterHandler(const HandlerName: string): boolean;
procedure Clear;
function GetHandlerCount: Integer;
function GetHandlerName(Index: Integer): string;
procedure RegisterStandardHandlers(ReplaceExisting: boolean = false);
function OpenFromStream(Source: TStream; const SourceName,
MIMEType: string; const Options: THPDFDocumentHandlerOptions;
out Document: IHPDFHandledDocument;
out Info: THPDFDocumentHandlerInfo): boolean;
function OpenFromFile(const FileName, MIMEType: string;
const Options: THPDFDocumentHandlerOptions;
out Document: IHPDFHandledDocument;
out Info: THPDFDocumentHandlerInfo): boolean;
end;
注册、替换、移除、快照和查找都是线程安全的,最多 32 个 handler,每个 handler 名称占一个不区分大小写的槽位
识别在 registry 锁之外、针对稳定的接口快照运行,得分相同时保持注册顺序
RegisterStandardHandlers opts into XPS, EPUB, and CBZ support without changing PDF-specific loading APIs