Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print a document

Status
Not open for further replies.

digitallyskilled

IS-IT--Management
Sep 23, 2004
39
0
0
US
I want to print an HTML file to the default printer using c#. Any ideas on how to get started?
 
Create a webbrowser control and load the document into the browser. Then execute the following command:

object o = null;

webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,ref o, ref o);


Hope that gets you started.

 
Is there a way to do it using the print functions in .net? we are printing html invoices that we are generating in a seperate part of the application. We want to create another class that we can call to print the invoices. we also want to keep the server logged off
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top