IPdfDocumentCoreRuntime that pins a caller-owned lifetime referencefunction BindPdfDocumentCoreRuntime(Resolver: TPdfCoreSymbolResolver;
const Lifetime: IInterface): IPdfDocumentCoreRuntime;
Creates the runtime by asking Resolver for each of the 25 required PDFium exports, from FPDF_LoadMemDocument64, FPDF_GetPageCount and FPDFText_GetText through FPDF_RenderPageBitmap, FPDF_SaveAsCopy and FPDFPage_SetRotation; the first missing export raises EPdfDocumentCore with the unresolved symbol name
Lifetime is an arbitrary interface reference the runtime retains: an application that loads its own engine library passes the library owner so the library stays loaded while core documents exist. Every TPdfDocumentCore created from the runtime holds the runtime, so the lifetime owner is released only after the last core document is freed
TPdf.CreateCoreSnapshot calls this function internally with a resolver over the loaded pdfium.dll and a library lease taken under the PDFium load lock
Resolver must be assigned and Lifetime non-nil, otherwise EPdfDocumentCore is raisedTPdfDocumentCore
Runtime := BindPdfDocumentCoreRuntime(ResolveExport, LibraryOwner);
Core := TPdfDocumentCore.Create(Runtime, TPdfDocumentCoreOptions.Default);
Core.LoadBytes(Bytes);