rdthomps Posted June 5, 2003 Posted June 5, 2003 Sampe code to print HTML not just txt ??? I see the sample code posted for printing a .txt file, but what about printing an HTML file? I need a way to do the same thing, only print an HTML file? Is there a way to do this, like hosting an HTML control then doing a print-preview, then print? Of course, I could call IE, but the user might have a different browser chosen for default and that can cause some dependencies. Anyway to do same as code below but for HTML? Quote
*Gurus* divil Posted June 6, 2003 *Gurus* Posted June 6, 2003 Nope. The best you'll find is hosting IE and calling some method on that to make it print. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
AndreRyan Posted June 6, 2003 Posted June 6, 2003 I don't think IE exposes a Print Method because Microsoft is really stupid sometimes, the user is the only one who can print the HTML page unless you write your own Web Browser Control. Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Humble Seeker Posted June 18, 2003 Posted June 18, 2003 Try AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER) AxWebBrowser1 being the name of the Web Browser Control Quote
nodiaque Posted July 28, 2003 Posted July 28, 2003 That's a sure thing, but what about if I want to print on another printer then the default one? Or if this can't be done, how to change the default printer? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.