Click here to Skip to main content
13,091,145 members (51,689 online)
Rate this:
Please Sign up or sign in to 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.
Posted 31-Jul-12 18:13pm
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
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I tried that , but printing became slow due to sending large amount of image to printer.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100