RenderPageToDCClip

Rendering and printing

Description

This function renders a page from the selected document directly onto a graphics surface, limited to a clip rectangle. The clip rectangle moves with the render offset set by SetRenderDCOffset, so it always selects the same part of the page

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.

Syntax

Delphi

Function TPDFlib.RenderPageToDCClip(DPI: Double; Page: Integer; DC: HDC; Const Clip: AnsiString): Integer;

ActiveX

Function PDFlib::RenderPageToDCClip(DPI As Double, Page As Long, DC As Long, Clip As String) As Long

DLL

int DLRenderPageToDCClip(int InstanceID, double DPI, int Page, int DC, const char* Clip);

Parameters

DPIRendering DPI
PagePage number to render
DCThe device context handle
ClipClip rectangle as "Left,Top,Width,Height" in PDF points, measured from the top left corner of the rendered page; numbers use a full stop as the decimal separator. An empty, malformed or zero-sized rectangle renders the whole page

Return values

1Render successful
0Render failed; LastRenderError describes the failure