HTML to Hardcopy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ianpitter
    New Member
    • Aug 2006
    • 11

    HTML to Hardcopy

    Is it possible to code a web page to allow a browser to print a hardcopy directly from a form using HTML and/or JavaScript/php, or does the user have to go through File -> Print to do it? I've been unable to find any article, book or FAQ which gives any guidance, so perhaps it is not possible.
    Any help would be appreciated.
    (this was originally posted in the HTML Forum.)
  • mrhoo
    Contributor
    • Jun 2006
    • 428

    #2
    You can write a script that will call the file-print dialog of most browsers, but the user has the last word.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      window.print() will open the print dialog (as if the user selected File...Print from the menu) but, as mrhoo pointed out, the user can choose not to print.

      Using some nasty JScript/ActiveX/vbscript combination, you could possibly get it to work in IE only (though I haven't checked).

      Comment

      Working...