PDFium Delphi Component Docs

ConfigurePdfLibrary procedure

Unit: PDFium
Lưu các thiết lập khởi tạo native toàn tiến trình dùng cho lần gọi LoadLibrary kế tiếp

Syntax

procedure ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration);

Parameters

ConfigurationTPdfLibraryConfiguration

Description

ConfigurePdfLibrary lưu các thiết lập khởi tạo native mà LoadLibrary sẽ truyền cho FPDF_InitLibraryWithConfig khi module PDFium được nạp lần đầu

Record này bao gồm UserFontPaths, V8Isolate, V8EmbedderSlot, V8Platform, Renderer (prpAgg hoặc prpSkia), FontBackend (pfbpFreeType hoặc pfbpFontations), BrotliEnabled và AllowMachineTime

Cấu hình được sao chép sâu, kể cả mảng UserFontPaths, nên những thay đổi sau đó trên record của người gọi không còn tác dụng

AllowMachineTime điều khiển chính sách machine-time của FPDF_SetSandBoxPolicy được áp dụng ngay sau khi khởi tạo native, còn TPdfLibraryConfiguration.Hardened là lối tắt tắt chính sách này

Remarks

Example

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

See Also

GetPdfLibraryConfiguration, PdfLibraryConfigurationSealed, TPdf.LoadLibrary, ConfigureSystemFontProvider