PDFium Delphi Component Docs

ConfigurePdfLibrary 프로시저

유닛: PDFium
다음 LoadLibrary 호출이 사용하는 프로세스 전체 네이티브 초기화 설정을 지정합니다

구문

procedure ConfigurePdfLibrary(const Configuration: TPdfLibraryConfiguration);

매개변수

ConfigurationTPdfLibraryConfiguration

설명

ConfigurePdfLibrary는 PDFium 모듈이 처음 로드될 때 LoadLibrary가 FPDF_InitLibraryWithConfig에 전달하는 네이티브 초기화 설정을 저장해 둡니다

레코드에는 UserFontPaths, V8Isolate, V8EmbedderSlot, V8Platform, Renderer(prpAgg 또는 prpSkia), FontBackend(pfbpFreeType 또는 pfbpFontations), BrotliEnabled, IsolatePerDocument, AllowMachineTime가 들어갑니다

IsolatePerDocument는 FPDF_LIBRARY_CONFIG version 7의 m_IsolatePerDocument 플래그에 대응합니다. V8이 켜진 pdfium.dll은 이 플래그를 쓰면 프로세스 전체에서 하나의 isolate를 공유하는 대신 document마다 전용 v8::Isolate를 만듭니다. V8 빌드에서만 효과가 있고 V8Isolate는 nil로 맞춰 줘야 합니다

설정은 UserFontPaths 배열까지 깊은 복사로 저장되므로, 이후 호출자 레코드를 바꿔도 영향이 없습니다

AllowMachineTime은 네이티브 초기화 직후 적용되는 FPDF_SetSandBoxPolicy 머신 시간 정책을 제어하고, TPdfLibraryConfiguration.Hardened는 이를 끄는 지름길입니다

참고 사항

예제

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

관련 항목

GetPdfLibraryConfiguration, PdfLibraryConfigurationSealed, PdfNativeRendererType, PdfLibraryConfigurationSupportError, TPdf.LoadLibrary, ConfigureSystemFontProvider