procedure ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration);
| Configuration | TPdfLibraryConfiguration |
ConfigurePdfLibrary stores the native initialisation settings that LoadLibrary passes to FPDF_InitLibraryWithConfig when the PDFium module is first loaded
The record covers UserFontPaths, V8Isolate, V8EmbedderSlot, V8Platform, Renderer (prpAgg or prpSkia), FontBackend (pfbpFreeType or pfbpFontations), BrotliEnabled, IsolatePerDocument, and AllowMachineTime
IsolatePerDocument maps to the FPDF_LIBRARY_CONFIG version 7 m_IsolatePerDocument flag: a V8-enabled pdfium.dll then creates a dedicated v8::Isolate for every document instead of sharing one isolate across the whole process. It only takes effect with a V8 build and must be combined with a nil V8Isolate
The configuration is deep-copied, including the UserFontPaths array, so later changes to the caller's record have no effect
AllowMachineTime controls the FPDF_SetSandBoxPolicy machine-time policy applied right after native initialisation, and TPdfLibraryConfiguration.Hardened is the shortcut that disables it
EPdfErrorpfbpDefault requires Renderer prpSkia, otherwise EPdfError is raisedprpDefault keeps the DLL's default renderer even when BrotliEnabled or IsolatePerDocument raises the native structure version; see PdfNativeRendererTypeprpSkia on a PDFium build without Skia, or FontBackend pfbpFontations on a build without Fontations, makes the next LoadLibrary raise EPdfError and leaves the configuration unsealed, rather than letting native initialisation stop the process; see PdfLibraryConfigurationSupportErrorEPdfErrorEPdfError, because the native library rejects that combination at initialisationConfig := TPdfLibraryConfiguration.Hardened;
Config.Renderer := prpSkia;
ConfigurePdfLibrary(Config);