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

Victor Papp vpapp at bigfoot.com
Fri May 11 09:44:50 CDT 2001


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

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


  Care to share what you found out?

  Bob Filipiak (Contractor)
  MCP 

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


    Already found out how.

    Thanks.
      ----- Original Message ----- 
      From: Victor Papp 
      To: javascript at latech.edu 
      Sent: Thursday, May 10, 2001 10:01 PM
      Subject: [Javascript] Opening and printing PDF file from a new window


      Hi,

      I want to use this code
       
       < a href="somefile.pdf" target="_blank">click here< / a>

      My question: is it possible to have opened the print dialog for printing this file automatically?
      Like we use it on the body tag:

      < body onload="window.print()" >

      Thanks in advance,

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


More information about the Javascript mailing list