function PdfNativeRendererType(Preference: TPdfRendererPreference; SkiaBuild: Boolean): FPDF_RENDERER_TYPE;
| Preference | TPdfRendererPreference. The Renderer value of a TPdfLibraryConfiguration |
| SkiaBuild | Boolean. True when the PDFium build was compiled with Skia support, which is the case when it exports FPDF_RenderPageSkia |
FPDF_RENDERER_TYPE: FPDF_RENDERERTYPE_AGG or FPDF_RENDERERTYPE_SKIAPdfNativeRendererType is the mapping LoadLibrary uses for FPDF_LIBRARY_CONFIG.m_RendererType whenever the configuration structure reaches version 4 or later, which happens with an explicit renderer or font backend and likewise with BrotliEnabled or IsolatePerDocument
prpAgg and prpSkia map to the matching native value; prpDefault keeps the build's own default, Skia for Skia-enabled builds and AGG otherwise, so switching on an unrelated option never changes the renderer
The bundled pdfium.dll and pdfium.v8.dll are Skia-enabled builds
Assigned(FPDF_RenderPageSkia) after LoadLibrary to probe the loaded runtimeprpSkia for such a build makes LoadLibrary raise EPdfError — see PdfLibraryConfigurationSupportErrorLoadLibrary;
if PdfNativeRendererType(GetPdfLibraryConfiguration.Renderer, Assigned(FPDF_RenderPageSkia)) = FPDF_RENDERERTYPE_SKIA then
Writeln('Rendering with Skia');