From: Sug on 7 Dec 2005 06:22 > > > "Printing Pages with the WebBrowser Control" > http://msdn.microsoft.com/workshop/browser/webbrowser/webbrowser.asp?frame=true#Print_page > HTH > Alex > > All these issues can be avoided by using an embedded IE browser control and > a "print template" which is supported in IE 5.5 or above. I've used a > template to print directly to the printer (avoiding the Print Options dialog > box), and to specify my own headers and footers, that do not get used by > Internet Explorer itself. > > -- David > http://www.dcsoft.com Hi Alex, David, Thanks so much for your helpful info. Yes I can verymuch print using the WebBrower but that prints to the default printer. Calling "IOleCommandTarget::Exec" with OLECMDID_PRINT sends my document to the default printer. I want the document to be printed on a specific printer which may/maynot be default printer. And I want to pass name of this printer to the print routine so that my HTML is printed on this specific printer. Is there any way to pass name of the printer? I serched lots of documentation and looks like there is no way to pass a printer name to "IOleCommandTarget::Exec". Are there any alternatives to print an HTML to a specific (non-default) printer? Sug
From: Alex Blekhman on 7 Dec 2005 07:25 Sug wrote: > Calling "IOleCommandTarget::Exec" with OLECMDID_PRINT > sends my document to the default printer. > > I want the document to be printed on a specific printer > which may/maynot be default printer. And I want to pass > name of this printer to the print routine so that my HTML > is printed on this specific printer. I think that print templates is what you need. Look in MSDN for.. 1. IWebBrowser2::ExecWB(IDM_PRINT...) 2. IDM_PRINT Command ID 3. "Beyond Print Preview: Print Customization for Internet Explorer 5.5" http://msdn.microsoft.com/library/en-us/dnie55/html/beyondprintpreview.asp
From: Sug on 7 Dec 2005 08:34 Hi Alex Well, I did have a look at Print Template already. But I didnt get a clue from that of how I can make the Print Template use a specific printer... I might be missing something but I think Print Template is more to do which how you want to handle the print (layout etc) rather than which printer you want to print it on... Am I missing something? Once again, thanks for your help. "Alex Blekhman" <tkfx.N05P4M(a)yahoo.com> wrote in message news:%235J%23Nly%23FHA.272(a)TK2MSFTNGP09.phx.gbl... > I think that print templates is what you need. Look in MSDN for.. > > 1. IWebBrowser2::ExecWB(IDM_PRINT...) > 2. IDM_PRINT Command ID > 3. "Beyond Print Preview: Print Customization for Internet > Explorer 5.5" > http://msdn.microsoft.com/library/en-us/dnie55/html/beyondprintpreview.asp > >
From: Alex Blekhman on 7 Dec 2005 09:46 Sug wrote: > Well, I did have a look at Print Template already. But I > didnt get a clue from that of how I can make the Print > Template use a specific printer... Yes, you're right. I can't find how to change printer, too. This information can be retrieved, but as read-only (__IE_PrinterCmd_DevNames property). So, you'll be required to put little more work in it. Create WebBrowser control instance, then query from it IViewObject interface. You can use IViewObject::Draw method to print WebControl's content to any target device. You will need to arrange DEVMODE struct for desired device, though. HTH Alex
First
|
Prev
|
Pages: 1 2 Prev: URLDownloadToFile Next: ON_MESSAGE change from VC++ 6.0 to VC++ .net 2003 ? |