473,379 Members | 1,542 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,379 software developers and data experts.

Printing 300+ DPI bitmaps in C#

I'm writing an app that displays a bitmap as its background and then draws text on top of it at certain positions based on user interaction. This bitmap/text combination is also sent to the printer when the user chooses to print. I already know how to do all that, except...

When I try to load and print a full-page bitmap that has a resolution of, say, 300 DPI, it ends up printing huge; so huge in fact, that only the upper-left corner of the bitmap fits on the page. If I print the same bitmap from PhotoShop or any other such graphics program, it prints the entire bitmap on one page.

How can I make this happen in my C# app? I know it has to do with the fact that bitmaps default to 96 DPI in .Net, but I haven't been able to figure out how to get around this.

Can someone shed some light?
Aug 27 '08 #1
1 5284
Plater
7,872 Expert 4TB
I think there are some properties of the Bitmap object you can set that helps fix this. I don't remember where they are exactly, but there was something that controlled the ratio of xaxis pixels per whatever and one for the yaxis and then the diagonal. I think you can also specify inch measurements?

Either that or you need to change how you draw the bitmap onto your printer Graphics object.
Aug 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ABF | last post by:
Hello, I have a concern. I have created a small printing framework and it is taking a lot of memory. Simply put, the framework iterates through objects that implement a "printable" interfaces....
0
by: Chris | last post by:
Hi, I found this code to send print direct to printer. It works perfect. Imports System Imports System.Text Imports System.Runtime.InteropServices <StructLayout(LayoutKind.Sequential)> _...
0
by: martinjeffreys | last post by:
Hi I've a number of Access2002 reports with embedded bitmaps. If the printer print quality is set to 'Normal' all prints OK - if 'Fast' only the text appears. I've tried setting the default...
2
by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new PrintPreviewDialog();
5
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can...
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...
2
by: Mike | last post by:
Hello everybody. I am drawing a country map that consists of 149 municipality bitmaps, each around 25 Kb. I draw it onto the in-memory bitmap, then draw it on the picture box. I use C++, but...
0
by: =?Utf-8?B?UGxheWE=?= | last post by:
I am using a print preview dailog in vb .net and when I open the dialog there are multiple pages. Everytime I press the print button only the last page prints. I have tried so many things but...
0
by: dotnet2005 | last post by:
Hi Toall , I want to explain you clearly , I am having some panels having some controls CheckBox,ComboBox,Datagridview,Hyperlink,label,Listbox,Picturebox,RadioButt­ on ,Textbox)...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.