Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

RenderPageToDC and resolution

Question

I'm using RenderPageToDC to print to printers, rather than using PrintDocument because I need to specify a non standard page size. It works okay, except for one thing. What do I pass in for DPI? When I pass in 300, the output is scaled down 75%. When I pass in 600, it prints perfectly scaled. I assume that the "correct" value for DPI will be different from printer to printer. How am I to determine that?

Answer

Sounds like you can use GetDeviceCaps() to extract the DPI.

"Specifically, GetDeviceCaps(hdc, HORZRES) and GetDeviceCaps(hdc, VERTRES) are most likely what's desired.

http://stackoverflow.com/questions/3154620/how-to-find-out-dcs-dimensions


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum