PDFium Delphi Component Docs

ConfigurePdfLibrary procedure

Unit: PDFium
Sets the process-wide native initialisation settings used by the next LoadLibrary call

Syntax

procedure ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration);

Parameters

ConfigurationTPdfLibraryConfiguration

Description

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, and AllowMachineTime

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

Remarks

Example

Config := TPdfLibraryConfiguration.Hardened;
Config.Renderer := prpSkia;
ConfigurePdfLibrary(Config);

See Also

GetPdfLibraryConfiguration, PdfLibraryConfigurationSealed, TPdf.LoadLibrary, ConfigureSystemFontProvider