c# - Printing complex Winforms -
We have found a complicated Winform app with each form that contains potentially multiple sub-forms and capable of printing Need to have data contained in these forms
We are currently using Print Document Control. For each form (or form element) that we want to print, we are calling the Control.DrawToBitmap ()
method, then dragging the Graphics
object while printing Are there.
It mostly works, and we have alternative solutions to print the entire contents of the form with scalable content.
However, we have 2 problems.
1) The quality of print out is very low, and in many cases is difficult to read; And
2) Print out looks quite different depending on the user's screen resolution
Is there a good way to print C # form? Surely this is a problem that has been solved earlier. I like a method that I do not necessarily need to re-apply front end (with crystal reports)
You may want to increase the size of the bitmap / rex you are attracting if the bitmap resolution is low, then it will not look good on the printed piece of paper. Monitors are lucky if they are up to 120 pixels / point inches per inch, and although most printers can print at 150 dpi, the default setting of the printer is 300/600 dpi. I do not know if the PageUnit
measures have effect on the output using PrintDocument
, but when I use GraphicsUnit.Point
Use the surface (Of course, bitmap will be too large or the printing speed will not be reduced or will fail due to the amount of data sent to the printer.)
Comments
Post a Comment