[Javascript] Opening and printing PDF file from a new window

Victor Papp vpapp at bigfoot.com
Fri May 11 12:11:24 CDT 2001


With NN 4.5 No. It is (as far as I understand) doesn't forward the print command to the viewer.
However the document opens in the viewer.

  ----- Original Message ----- 
  From: Filipiak, Bob (Contractor) 
  To: 'javascript at LaTech.edu' 
  Sent: Friday, May 11, 2001 7:30 PM
  Subject: RE: [Javascript] Opening and printing PDF file from a new window


  Does it work with Netscape?

  Bob Filipiak (Contractor)
  MCP 

    -----Original Message-----
    From: Victor Papp [mailto:vpapp at bigfoot.com]
    Sent: Friday, May 11, 2001 10:45 AM
    To: javascript at latech.edu
    Subject: Re: [Javascript] Opening and printing PDF file from a new window


    Yes,

    actually, I use the onclick event to execute these:

    1) open  a new window
    2) write HTML there using window.document.write
    3) flush (window.document.close)

    the HTML I write there contains

    onload="window.print()" in the body tag
    embed tag for the PDF file.

    It a bit messy using only javascript, so I used the capabilities of  ASP and simplified the process:

    1) using the < a > tag I link to the print.asp file.
    2) there, I build this mentioned above HTML code

    Hope this helps.
    Victor Papp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010511/e177a627/attachment.htm>


More information about the Javascript mailing list