Last post Jan 04, 2009 08:37 AM by retroviz
Jan 04, 2009 07:31 AM|mike_smith|LINK
I have a problem printing a win form in a good quality.
I use the follwoing code in the PrintPage event:
Bitmap bmp = new Bitmap(this.Widht,this.Height,16bppFormat);
this.drawToBitmap(bmp , new Rectangle (0,0,this.Widht,this.Height));
I get the image of the entire form but it is not in sharp quality.
For example, I have a certain image on the form. When I print the captured form , which has an image on it, (using the above code) I get it not in such sharp quality as I would get it when printing the same image with the IE browser.
I don't know why the IE has much better quality where I can see small details of the image whereas printing the same image in WinForms i don't get the same quality as in IE.
Does any one know a better way where I can capture the form (in winforms) and print it in the best quality possible?
Thank you in advance,
Jan 04, 2009 08:37 AM|retroviz|LINK
Would suggest you ask your question at
http://windowsclient.net/Forums/ as this forum is for ASP.net.
However, from memory do you need to set the SmoothingMode of your Graphics object to AntiAlias to get a better quality image. Also you could try using the PrintDialog control (if you are not already) and play around with some of the print settings there
Hope that helps,