Класс THPDFDocumentHandlerRegistry
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 по стабильному снимку интерфейса, а при равных score сохраняется порядок регистрации
RegisterStandardHandlers подключает поддержку XPS, EPUB и CBZ, не трогая специфичные для PDF API загрузки