PDFium Delphi Component Docs

PdfNativeRendererType function

Unit: PDFium
Reports the native renderer a renderer preference selects for a given PDFium build

Syntax

function PdfNativeRendererType(Preference: TPdfRendererPreference; SkiaBuild: Boolean): FPDF_RENDERER_TYPE;

Parameters

PreferenceTPdfRendererPreference. The Renderer value of a TPdfLibraryConfiguration
SkiaBuildBoolean. True for a PDFium build compiled with Skia support, which is the case when it exports FPDF_RenderPageSkia

Return Value

FPDF_RENDERER_TYPE: FPDF_RENDERERTYPE_AGG or FPDF_RENDERERTYPE_SKIA

Description

PdfNativeRendererType 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 also 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 enabling an unrelated option never changes the renderer

The bundled pdfium.dll and pdfium.v8.dll are Skia-enabled builds

Remarks

Example

LoadLibrary;
if PdfNativeRendererType(GetPdfLibraryConfiguration.Renderer, Assigned(FPDF_RenderPageSkia)) = FPDF_RENDERERTYPE_SKIA then
  Writeln('Rendering with Skia');

See Also

ConfigurePdfLibrary, GetPdfLibraryConfiguration, PdfLibraryConfigurationSealed