473,320 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to set printer resolution when printing graphics

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
Nov 20 '05 #1
2 10774
Hello,

"Philippe" <ph************@ubs.com> schrieb:
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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
I've checked, it IS available, the
PrintDocument.DefaultPageSettings.PrinterResolutio n shows
1200x1200, the
System.Drawing.Printing.PrintPageEventArgs.PageSet tings.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
-----Original Message-----
Hello,

"Philippe" <ph************@ubs.com> schrieb:
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 1200is supported.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tom Berry | last post by:
We currently are trying our first transformation from VB6 to VB.Net. Of course, the Printer object is gone, but I'm having trouble finding the replacement syntax necessary to perform similar...
2
by: qumpus | last post by:
My program right now generates USPS style shipping label using System.Drawing.Graphics. It works fine except that the printer prints really slowly. I want to make my program take advantage of true...
5
by: jho | last post by:
I have an Epson LQ-570+ and a preprinted triplacate form. How would I go about Inputing data and getting it to print on the form in the desired place. I noticed that making a template in word...
1
by: Mina Gohari | last post by:
Hi all I have a problem with printing a report card to laser printer. Everything works properly on ink-jet printer, but when I use laser printer , it's not in predifined format. everything is...
4
by: Rob T | last post by:
I have a small VB program that has a printing module...very simple....and works great. However, If I try to print to a generic printer, I get the following error: "The data area passed to a...
4
by: Charlie | last post by:
I need to print using the VB.net printing classes to a tractor feed printer. My client loaned me a Panasonic kx-p2123 to set up the job. I was able to print from Notepad using the Generic/Text...
3
by: Michael | last post by:
Hi, I'm trying to print barcodes to the Dymo LabelWriter printer. Put everytime I send a job to the label printer it just outputs an empty label. If I change the default printer back to the...
1
by: Chris Dunaway | last post by:
When using PrintDocument to print something, if I check the PageBounds property of the PrintPageEventArgs object, it shows the rectangle to be 850 x 1100, or 100 dpi. But when I check the value of...
5
by: Raman | last post by:
Hello friends, I want to print an ID card. I have one Windows Form that contains front and back side. The printer is printing both front and back side at a time. I am trying to send both sides...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.