Click here to Skip to main content
15,907,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i work with printdocument control in c#?
can you suggest me a complete reference?
Posted
Comments
bhavik s 31-May-11 0:50am    
I generate dynamic report useing printdocument, and now i want to save[export] it in .pdf/.doc, How can i do?

A simple MSDN search could have given you this:

PrintDocument Class[^]
 
Share this answer
 
Complete reference here[^]

That should give you a clue as to where to search for a reference to a .net control next time you need one.
 
Share this answer
 
Here is the MSDN Article. PrintDocument Class[^] It provides all you need to know including a real simple example.

Good Luck!
 
Share this answer
 
From code behind and in button click event place this code,-
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "ff", "window.print();", true);


Or in case of html place this,-

<input id="btnPrint" type="button" value="Print" class="PrintButton" onclick="window.print(); "/>
 
Share this answer
 
that solution in msdn wasn't usefull. i want to draw any object such as texts, shapes, images, ... with printdocument. how can i do it?
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900