Frequently Asked Question:
RenderPageToDC and resolution
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?
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