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!

Bookmark link to print multiple files

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
Here's the deal...

I have a list of PDFs that all contain the same bookmark list so that they are all interconnected. The PDFs are categorised into various [red]Groups[/red] and [blue]Sections[/blue] as illustrated below. The bookmark list follows the same structure.

[red]1. Boiler Controls[/red]
[blue]1.1 Feedtanks[/blue]
[green]Link to PDF 1[/green]
[green]Link to PDF 2[/green]
[green]Link to PDF 3[/green]
[green]Print all PDFs in this section[/green]
[blue]1.2 Steam Injectors[/blue]
[blue]1.3 Level Controls[/blue]
[blue]1.4 Sample Coolers[/blue]

[red]2. Flowmetering[/red]
[blue]2.1 Gilflo Meters[/blue]
[blue]2.2 DIVA Meters[/blue]
[blue]2.3 Orifice Plate Meters[/blue]

[red]3. etc...[/red]
[blue]3.1 etc...[/blue]
[blue]3.2 etc...[/blue]
[blue]3.3 etc...[/blue]

I would like to have a [green]Print this section[/green] link within each section that will print all the PDFs that are contained in this section.

I've noticed that you can assign a Javascript to a bookmark link. Is it possible to get this javascript to send the appropriate documents to the printer?

I hope that all made some sense :) Thanks in advance.

Tony
________________________________________________________________________________
 
I managed to half-solve my problem by doing the following.

1) I applied the following Javascript to the [green]Print this section[/green] link
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();
}
2) Each PDF that needs to be printed needs the following done...

a)goto Advanced >> Javascript >> Document Javascripts
b)enter a script name of disclosed
c)replace the code that appears with...
Code:
this.disclosed = true;
What I need to do now though is have the first bit of Javascript able to print all PDFs in a specified directory rather than specifying each individual file. I have posted this new question in Thread223-984512

Tony
________________________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top