Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The display program that I used to render to a window dc was used by me to write to PriPrinter a virtual printing software. Everything worked fine except that the images were rendered to true size and not according to specified size. Is it because it is a software or is it typical of printers to function like that?

What I have tried:

I have been trying to resolve this all day
Posted
Comments
Richard MacCutchan 7-Apr-24 3:15am    
Without seeing your code it is impossible to guess.

1 solution

The problem you're describing is resolution. Typically, printers support a much higher resolution than a screen does, so if you have made assumptions about DPI, for instance, you will see a different output.

It's best to work with Device Independent Pixels, as described here[^].
 
Share this answer
 
Comments
CPallini 8-Apr-24 2:02am    
5.
Pete O'Hanlon 8-Apr-24 4:13am    
Thanks.
Gbenbam 22-Apr-24 17:30pm    
Your solution and link are quite revealing. I would like to know how to convert Device independent pixels
to millimeters. This is because the first thing my application does is to find the value of a millimeter in pixels ( by using GetDeviceCapps to get size of the screen in pixels then in millimetres and using the two values to calculate the value of a millimeter in pixels. All lengths are then given in terms of the calculated one-millimeter-pixels.)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900