Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I print multiple .pdf files from a html page with javascripts?

Status
Not open for further replies.

Petal

Programmer
Jun 8, 2001
56
0
0
NO
I would like to print multiple .pdf files automaticaly from a html page with javascripts.

Is it possible? How can I do it then?
 
Hi Petal,
I have a similar issue with printing one pdf file from an asp page when the user clicks on the print button. have you found a solution to your problem? i would really appreciate your help,

thanks
 
open the pdf files in popup windows, then print them from the opener (after you have confirmed that they have loaded). You can open all the popups that u need - or you could changes the location of the popup then print it again from the opener.

Semi-Psuedo Code
Code:
<script>
function openPDF(var filename)
 {
  window_handle = window.open(filename);
  window_handle.print();
  window_handle.close();
 }
</script>

...

<a href=&quot;javascript:openPDF('myfile.pdf');&quot;>Open</a>

I havent worked with popups in a while - someone with a bit more recent experience with them could help you put together a working script. Good luck! -gerrygerry
Go To
 
I facing a similar problem !

Internal website that uses a frameset needs javascript print function.

Function to be triggered from menu frame(top) to print contents of main frame(bottom). Their is a problem! The main frame(bottom) may contain an embedded object (using the embed tag) pdf file or an embedded (using iframe) excel file as well as regular htm(l) files.

Though I am able to print regular htnl files but not the embedded objects like excel and pdf docs!!

Script must be able to detect and print these files. I am unable to solve this. Please help me out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top