473,320 Members | 1,982 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.

Printing Images

Using the PrintDocument class, I print a bitmap image sized 267 wide by 201
high to a laser jet 4 printer. The image actually prints 2.88 inches wide by
2.19 inches high. Why doesn't it print the correct size?
--
Dennis in Houston
Dec 1 '05 #1
3 1083
"Dennis" <De****@discussions.microsoft.com> schrieb
Using the PrintDocument class, I print a bitmap image sized 267 wide
by 201 high to a laser jet 4 printer. The image actually prints
2.88 inches wide by 2.19 inches high. Why doesn't it print the
correct size?

What is the correct size, in your opinion? The image resolution is probably
92x92 dpi. If you have 92 dots per inch, then you have 267 dots per 2.88
inches. Have a look @ microsoft.public.dotnet.framework.drawing.
Armin

Dec 1 '05 #2
The image will have a resolution declared. This is used to size the image to
whatever the printer has declared as it's resolution. To fill the page with
the image you'll have to specify the stretch using the form of DrawImage in
which you specify all the parameters of source, destination and graphics
unit.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
Using the PrintDocument class, I print a bitmap image sized 267 wide by
201
high to a laser jet 4 printer. The image actually prints 2.88 inches wide
by
2.19 inches high. Why doesn't it print the correct size?
--
Dennis in Houston

Dec 1 '05 #3
Thanks...I'll have a look at the DPI of both the printer and image
--
Dennis in Houston
"Bob Powell [MVP]" wrote:
The image will have a resolution declared. This is used to size the image to
whatever the printer has declared as it's resolution. To fill the page with
the image you'll have to specify the stretch using the form of DrawImage in
which you specify all the parameters of source, destination and graphics
unit.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
Using the PrintDocument class, I print a bitmap image sized 267 wide by
201
high to a laser jet 4 printer. The image actually prints 2.88 inches wide
by
2.19 inches high. Why doesn't it print the correct size?
--
Dennis in Houston


Dec 2 '05 #4

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

Similar topics

18
by: Roger Shrubber | last post by:
Hello all I have created a page which has several pictures on it. Each picture is surrounded by a frame made from actual photos of real picture frames, consisting of four corner tiles and four...
4
by: venkat | last post by:
Hi all, I need print a webpage from internet explorer. The page may contain images, links, stylesheets etc. how will i send all these things to server side for printing. I am using asp.net with...
1
by: Frank.Sebesta | last post by:
I have a employees database with a picture that shows on a form with employee information. Similar to the Northwinds sample database. When I print the record, my output is only the data and does...
1
by: Ling Woo | last post by:
Hello My application needs to print images that are created within it. The images are BitMaps and are placed in PictureBoxes. 1.) Can anyone tell me how to I can code so the images are sent to...
1
by: Jos Roijakkers | last post by:
I am writing a program in Visual Studio 2005 (VB) that can print scanned images (saved as jpg-files). The printing is done by the following code: Private Sub pdoc_PrintPage(ByVal sender As...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
2
by: letsgetsilly | last post by:
I'm developing the external corporate website for my company in Visual Studio 2003 using html, css, and a user web control for the header/navigation. When I try to print any of the pages only the...
4
by: Prakash | last post by:
I'm developing an HR package which would contain the Employees Photo + upto 3 pages (pictures) of his Passport + pictures of his Driving License and Residence Card. If the user wants to print...
0
by: gnewsgroup | last post by:
In my asp.net 2.0 web application. I create chart images on the fly by getting the data from the database. These chart images all have fixed width, but the height is dynamic depending on the...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
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.