I try to use the PrintDocument Class. I use the PrintPage event. The handler Function is something like that:
void PrintH(object sender, PrintPageEventArgs e)
The e.Graphics object default PageUnit is GraphicsUnit.Display which is stated by the documantation to be “Typically” 1/100 of inch for Printers. Does typically mean always? It is a bit ambiguous. If not is there a way to determine what is the Display equal in inches or mm (preferably .net solution)?
It is “typically” because the number of pixels per inch for a video display is changeable. The default has been 96 dots-per-inch for a very long time, making it a close match with the 1/100″ graphics unit for the printer. But that’s changing, Vista especially made it easy to change the default. The “Make it easier to read what’s on your screen” page in the Display applet with offered radio buttons for 100% (96 dpi), 125% (120 dpi) and 150% (144 dpi).
There is otherwise rarely a good match with the actual monitor dpi. Increasing the dpi just makes everything drawn bigger. Easier to read. The printer mapping is accurate however. When you draw a line that’s 100 long then you’ll get an inch on paper, regardless of the printer resolution.