PDFium Delphi Component Docs

โพรซีเยอร์ ConfigurePdfLibrary

Unit: PDFium
ตั้งค่า native initialization ระดับโปรเซสที่การเรียก LoadLibrary ครั้งถัดไปจะใช้

Syntax

procedure ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration);

Parameters

ConfigurationTPdfLibraryConfiguration

Description

ConfigurePdfLibrary เก็บค่าตั้ง native initialization ที่ LoadLibrary ส่งให้ FPDF_InitLibraryWithConfig เมื่อโหลดโมดูล PDFium ครั้งแรก

เรกคอร์ดนี้ครอบคลุม UserFontPaths, V8Isolate, V8EmbedderSlot, V8Platform, Renderer (prpAgg หรือ prpSkia), FontBackend (pfbpFreeType หรือ pfbpFontations), BrotliEnabled และ AllowMachineTime

ค่าตั้งถูกคัดลอกแบบ deep copy รวมถึงอาร์เรย์ UserFontPaths การแก้เรกคอร์ดของผู้เรียกภายหลังจึงไม่มีผล

AllowMachineTime ควบคุมนโยบาย machine-time ของ FPDF_SetSandBoxPolicy ที่ใช้ทันทีหลัง native initialization และ TPdfLibraryConfiguration.Hardened เป็นทางลัดที่ปิดมัน

Remarks

Example

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

See Also

GetPdfLibraryConfiguration, PdfLibraryConfigurationSealed, TPdf.LoadLibrary, ConfigureSystemFontProvider