Click here to Skip to main content
15,878,543 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am working on fixing a problem in a program (ReportGenerator) which seems to be an issue with the printed report, either being extremely poor quality or much too large.

This project involves the use of two threads that synchronize the task of preparing the pages for preview and printing them. The start points for these two threads are preventing me from using PrintPageEventArg (an input of PrintDocument_PrintPage) at the proper time in order to use that can improve the print quality. To try and work around this issue I created a graphic from a bitmap (graphics.FromImage(bitmap)) but this creates its own problems. In order to use this event I must change the start points for the threads causing even further problems. I have a limited time and I cannot take the time to completely re-write this project. Are there any suggestions as to what I may be able to try in order to find a workaround?

This is a general overview of the project, including the threads and my methods:

1. Print Show Dialog -> ok
2. Print_Document_BeginPrint -> Thread begins here
3.Create a graphic from bitmap(graphics.FromImage(bitmap))
From here if I could use PrintPageEventArg my issues would be solved but I am not that lucky

Alternatively I could create a bitmap and draw a prepared graphic on it (graphics.Draw(..bitmap...)) saving this image on the system and then restore it in PrintDocument_PrintPage,This method allows me to use PrintPageEventArg but only after I restore the previously created graphics and print them.

I have asked questions related to this problem before on these links.

Any help would be greatly appreciated. Thanks in advance.
syed shanu 23-Jul-13 5:23am    
hi,Shimashim Did you solve your problem.Is print with high quality is fine now.mail me i need few clarification on this printing my mail is

The only real way to improve print quality is to create a larger bitmap that is finer quality. GIGO.

graphics.FromImage(bitmap) creates an exact copy, though, you should not lose quality doing that.
Share this answer
I tried that , but printing became slow due to sending large amount of image to printer.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900