The PDF document can be generated from the print document by using the // Event handler to save the PrintDocument page as image. Save PrintDocument to Image: Need help understanding this procedure. For that I use PrintDocument, for preview PrintPreview. I have a Could you tell me how to save printdocument to PDF format, please??.
|Published (Last):||19 November 2004|
|PDF File Size:||4.97 Mb|
|ePub File Size:||13.62 Mb|
|Price:||Free* [*Free Regsitration Required]|
I have been sending text and graphics to an image and then using DrawImage to draw the image to a PrintDocument. The benefit of doing this is that I could used one block of code to generate an image that I could either print, display or save.
Unfortunately, the printed image does not look that good.
How to generate PDF from Print Document?
Is there a way to print to the PrintDocument and then save the contents of the PrintDocument as an image? You can call the PrintPage event with the graphics of your choice. Code Block Public Class Form1. Dim Bmp As Bitmap.
C# Imaging – Image Saving & Printing in C#.NET
Object, ByVal e As System. Dim G As Graphics. DrawImage New Bitmap “C: If it works, it is the correct way.
Rather than an object I would have passed a PrintPageEventArgs with different graphics, but it doesn’t matter. I didn’t, but you may. It contains the page and margin dimensions.
The content you requested has been removed.
Remove From My Forums. Visual Basic Express Edition. Visual Basic Express Edition https: Sign in to vote. Friday, January 11, Friday, January 11, 6: Friday, January 11, 9: I am sure I should understand what you mean but I don’t.
PrintPage Do some setup stuff and print text and graphics using e. Graphics End Sub To print the same stuff to an image I do the following: How do I call DoPrintPage so that it prints to an image?
Printdocumet am sure this is simple, but I am just not getting it. Using my simple explanation could you show me how? I have read many of your posts and have found your advice quite helpful. Friday, January 11, 2: I think I understand now.
[RESOLVED] Can I create an image from my print document information?
What I did was to put the print code into a sub with an object reference. If I am printing to an image, e is a Graphic. Is this the correct way? Friday, January 11, 4: It is completely obvious now. I am doing the same thing only not as clearly. printdocjment
I like how the resolution of the bitmap is controlled as well. I do have a probably stupid question. Friday, September 30, wave Help us improve MSDN.