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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Javascript to print all PDFs in a directory

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
I have a common bookmark list within multiple PDFs. I wish to have a number of Print this section links in this bookmark list and have each link execute a javascript that will print all the PDFs in a particulary directory. The directory will be different for each Print this section link.

I already have the following code that prints a list of PDFs from an Array but I would like to just specify a directory instead and have just the PDFs in that directory printed.
Code:
var FileList = new Array(3);

FileList[0] = "Boiler controls/Feedtanks/p401_08.pdf"
FileList[1] = "Boiler controls/Feedtanks/p401_05.pdf"
FileList[2] = "Boiler controls/Feedtanks/p006_03.pdf"

for(i=0; i<FileList.length; i++)
{
  var doc = app.openDoc(FileList[i], this);
  doc.print(false);
  doc.closeDoc();
}
Many thanks in advance

Tony
________________________________________________________________________________
 
Hi Tony, is this feature going to be used only by you on a specific machine or is it to be accessed by end users?

Rule Britannia, Britannia Waives the Rules
 
Unfortunately not - it will be used over a network and run from a CD. Relative paths are the only way I think.

Tony
________________________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top