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.
Any help would be greatly appreciated. Thanks in advance.