RenderPageToDC

Rendering and printing

Description

This function renders a page from the selected document directly onto a graphics surface. On Windows the target surface is a Device Context handle (DC).

By default rendering uses the GDI+ system which is available by default in Windows XP and later.

It is also possible to render using Cairo, use the SetCairoFileName and SelectRenderer

functions.

Syntax

Delphi

function TPDFlib.RenderPageToDC(DPI: Double; Page: Integer; DC: HDC): Integer;

ActiveX

Function PDFlib::RenderPageToDC(DPI As Double, Page As Long, DC As Variant) As Long

DLL

int DLRenderPageToDC(int InstanceID, double DPI, int Page, int DC);

Parameters

DPIThe DPI to use when rendering the page
PageThe page number to render
DCThe device context handle

Return values

0Page could not be rendered Page was rendered successfully
1