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
| DPI | Rendering DPI |
|---|---|
| Page | Page number to render |
| DC | The device context handle |
| Clip | Clip 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
| 1 | Render successful |
|---|---|
| 0 | Render failed; LastRenderError describes the failure |