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;

Registrazione, sostituzione, rimozione, snapshot e lookup sono thread-safe, con al massimo 32 gestori e uno slot case-insensitive per nome di gestore

Il riconoscimento gira fuori dal lock del registro contro uno snapshot stabile delle interfacce, e i punteggi pari conservano l'ordine di registrazione

RegisterStandardHandlers abilita il supporto a XPS, EPUB e CBZ senza toccare le API di caricamento specifiche per PDF

Gestori di Documenti Opzionali