DARenderPageToDC

Direct access functionality, Rendering and printing

Description

Renders the specified page from the specified 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 in Windows XP and later.

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

functions.

Syntax

Delphi

function TPDFlib.DARenderPageToDC(FileHandle, PageRef: Integer; DPI: Double; DC: HDC): Integer;

ActiveX

Function PDFlib::DARenderPageToDC(FileHandle As Long, PageRef As Long, DPI As Double, DC As Variant) As Long

DLL

int DLDARenderPageToDC(int InstanceID, int FileHandle, int PageRef, double DPI, int DC);

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
PageRefA page reference returned by the DAFindPage or DANewPage functions
DPIThe DPI to use when rendering the page
DCThe device context handle

Return values

0The page could not be rendered
1The page was rendered successfully double DPI, HDC DC);