Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# graphics printing threads , +
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 e.graphics 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.
http://stackoverflow.com/questions/11644115/how-to-improve-printed-text-quality-after-using-graphics-drawstring
http://stackoverflow.com/questions/11699219/save-an-image-as-a-bitmap-without-losing-quality
 
Any help would be greatly appreciated. Thanks in advance.
Posted 31-Jul-12 19:13pm
Comments
syed shanu at 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 syedshanumcain@gmail.com
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 Afzaal Ahmad Zeeshan 170
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,777
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2014
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