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;
Registration, replacement, removal, snapshots, and lookup are thread-safe, with at most 32 handlers and one case-insensitive slot per handler name
Recognition runs outside the registry lock against a stable interface snapshot, and equal scores retain registration order
RegisterStandardHandlers opts into XPS, EPUB, and CBZ support without changing PDF-specific loading APIs