locked
Need help to do silent printing programmatically RRS feed

  • Question

  • Anyone have experience using the "printto" verb to print a web page? For a .url file type ("internet shortcut"), the printto verb has the following directive:

    rundll32.exe C:\WINNT\system32\mshtml.dll,PrintHTML "%1" "%2" "%3" "%4"

    If I pass the following to ShellExecuteEx()...

    printto "c:\MyPage.url" "\\ksmsps1\LJ5_COPYROOM" "HP LaserJet 5Si/5Si MX PS" "IP_10.10.30.241"

    ...I still get the Print dialog popping up. I would expect that, if I properly give printto all that it needs (filename, printer, driver, port), then it should silently do its job. I don't want the Print dialog to show, but I can't get it to shut up. The above parameters work just fine for Excel or Acrobat printto verbs, but it doesn't seem to do the trick for URLs. Any ideas?

    Please help...

    Also tell me if there are any other ways...
    Friday, March 30, 2007 6:41 AM

Answers

  • Bijoy Thangaraj,

     

    Since there is no problem on silent printing for Excel and Acrobat printto verbs, the parameters witht the print method work fine. For the URL printing, I recommend you to connect to the print producer HP, ask them to test the URL printing and the proper parameters on your purpose. Thank you for the question.

     

    Tuesday, April 17, 2007 4:58 AM

All replies

  • Anyone to help me out?
    Friday, April 13, 2007 5:13 AM
  • Bijoy Thangaraj,

     

    Since there is no problem on silent printing for Excel and Acrobat printto verbs, the parameters witht the print method work fine. For the URL printing, I recommend you to connect to the print producer HP, ask them to test the URL printing and the proper parameters on your purpose. Thank you for the question.

     

    Tuesday, April 17, 2007 4:58 AM
  • I too want to avoid making a dialog box appear while printing... for me it is not a .url file but an html file.  It is important to avoid the dialog because there are many html files to print.

    Since it is Internet Explorer handling the "printto" verb, shouldn't we suspect the problem is a bug with Internet Explorer?  It happens also if i drag an html file onto a printer.  Maybe this is on purpose in order to give users a chance to set properties on their print after they drop the file on the printer... but if so, what can we do to silently print files in a generic way?
    Wednesday, April 18, 2007 12:21 AM