pdfNewPageFromCanvasDC
Capture the GDI canvas created by pdfGetCanvasDC into the
int32_t __stdcall pdfLoadFromCanvasDC(PPDF IPDF, double DPI, int32_t Options);
int32_t __stdcall pdfNewPageFromCanvasDC(PPDF IPDF, double DPI, int32_t Options);
function pdfLoadFromCanvasDC(const IPDF: PPDF; DPI: Double; Options: Integer): Integer; stdcall;
function pdfNewPageFromCanvasDC(const IPDF: PPDF; DPI: Double; Options: Integer): Integer; stdcall;
Purpose. Capture the GDI canvas created by pdfGetCanvasDC into the current page (pdfLoadFromCanvasDC) or onto a freshly-created new page (pdfNewPageFromCanvasDC), rasterized at DPI.
Description. Both call the same CaptureCanvasToPage(NewPage: Boolean, DPI) with only the NewPage boolean differing. Options is accepted by both but never passed through — whatever capture-mode selection it implies has no effect regardless of value.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
DPI | Capture resolution. |
Options | Accepted but silently dropped. |
Return value. Non-zero on success; 0 if IPDF is invalid or no canvas has been created via pdfGetCanvasDC.
See also. pdfGetCanvasDC.
C# (P/Invoke)
public static extern int pdfNewPageFromCanvasDC(IntPtr IPDF, double DPI, int Options);
Core
pdfNewPageFromCanvasDC
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.