<< Click to Display Table of Contents >> Navigation: Commands > Printing (on device) |
WPViewPDF is also able to print certain PDF pages to a windows device handle (HDC).
The printing will be internally done by GDI+.
COMPDF_DisablePrintHDC = 126
Disable print to HDC - it is not possible to enable again!
COMPDF_PrintHDC_SelectPage = 160
Select the page to be printed next
COMPDF_PrintHDC_SelectedPage = 161
Print the selected page on the HDC device with the handle passes as IntParam. The result value is -1 on error or the printed with and height as high and low word.
Note: Delphi Developers please use Canvas.Lock / CanvasUnlock when using Canvas.Handle.
If you need to use the standard GDI renderer with PrintHDC please use command
COMPDF_UseGDIPainter with parameter -2. To activate the default GDI+ renderer use parameter -1.
COMPDF_UseGDIForPrinting = 145
Select the standard GDI renderer instead of GDIPLUS, with parameter=1 or the GDIPLUS render with parameter=0 (default).
This only changes the printing, not the display!
Using 1 can result in smaller print files and faster output. For difficult PDF files it can cause a decrease in output quality. When using pdfPrint use option "STDGDI=1".
COMPDF_PrintHDCSetXRes = 152
Set X Resolution for the next COMPDF_PrintHDC. Use negative value to set desired width in pixels.
COMPDF_PrintHDCSetYRes = 153
Set Y Resolution for the next COMPDF_PrintHDC. Use negative value to set desired height in pixels.