RenderPageToMemory

Rendering and printing

Description

Renders one page into a caller-supplied bitmap memory buffer when the PDFium renderer is selected.

Syntax

Delphi

Function RenderPageToMemory(DPI: Double; Page: Integer; Target: Pointer; Width, Height, BitsPerPixel: Integer): Integer;

Parameters

DPIRequested rendering resolution before the current render scale is applied.
Page1-based page number. Values outside the document range are clamped to the nearest valid page.
TargetPointer to the destination pixel buffer supplied by the caller.
WidthDestination bitmap width in pixels.
HeightDestination bitmap height in pixels.
BitsPerPixelPixel format depth. Only 24 and 32 are accepted.

Returns

Returns 1 when PDFium renders into the buffer. Returns 0 for unsupported bit depths, when Cairo is selected, when PDFium is unavailable, or when rendering fails.

Remarks

SelectRenderer(3) must be active. Cairo does not support this memory-rendering path.

See also

SetPDFiumFileName, SelectRenderer, PDFiumRendering