pdfPrintToDC2
Print a PDF file to a DC.
int pdfPrintToDC2(PDFHandle pdf, HDC printDC)
This function prints the currently open PDF file to an already open DC
(Windows device context). The caller is responsible for creating the
DC and calling
StartDoc
and EndDoc
.
This can be used to do things like:
- inserting PDF pages into a single print job that will contain pages from other sources
- setting up a DC with various esoteric settings not supported by
pdfPrint4
pdfPrintSetPrinter
) before calling pdfPrintToDC2
,
because pdfPrintToDC2
needs to be able to query the
printer for various information.
The following parameters may be used, with the same behavior as for
pdfPrint4
:
C:
dc = CreateDC( ... );
StartDoc( ... );
/* ... non-PDF printing ... */
pdfPrintSetPrinter(pdf, L"LaserJet");
/* ... set other printing parameters ... */
pdfPrintToDC2(pdf, dc);
/* ... more non-PDF printing ... */
EndDoc(dc);
DeleteDC(dc);