how to set printer resolution when printing graphics

P

Philippe

I'm writing a vb.net application that prints jpeg pictires,
and although I set the
defaultpageSettings.printerResolution of my PrintDocument
object to the maximum available printer resolution
(1200x1200), I always get 600x600 in the .dpiX and .dpiY
properties of the graphics receieved in the
PrintDocument.PrintPage event...
And of course the print result is ugly!
Anyone's got an idea?

Philippe
 
H

Herfried K. Wagner [MVP]

Hello,

Philippe said:
I'm writing a vb.net application that prints jpeg pictires,
and although I set the
defaultpageSettings.printerResolution of my PrintDocument
object to the maximum available printer resolution
(1200x1200), I always get 600x600 in the .dpiX and .dpiY
properties of the graphics receieved in the
PrintDocument.PrintPage event...
And of course the print result is ugly!

Enumerate the 'PrinterSettings.PrinterReosolutions' and check if 1200 x 1200
is supported.
 
P

Philippe

I've checked, it IS available, the
PrintDocument.DefaultPageSettings.PrinterResolution shows
1200x1200, the
System.Drawing.Printing.PrintPageEventArgs.PageSettings.PrinterResolution
shows 1200x1200, yet the graphic context is still 600x600
dpi. I've made the same test, but selecting a resolution of
150x150: no effect on the available pixels in the graphic
context. Which property of which object is to be set to
force the printer resolution?

Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top