Hi there,
I have a PDF document that includes pages for two different regions. On the table of contents page, I have set up two print buttons -- one to print only U.S. pages, and one to print only Europe pages. This requires printing multiple page ranges (0-3, 5-11, 14-15, etc).
I have done this using the following code:
this.print({bUI: false, nStart: 0, nEnd: 3, bSilent: false});
this.print({bUI: false, nStart: 5, nEnd: 11, bSilent: false});
this.print({bUI: false, nStart: 14, nEnd: 15, bSilent: false});
The problem I've come across is that the page ranges print out of order. For example, instead of printing pages 0-3, then 5-11, then 14-15... it will come out 0-3, 14-15, 5-11, etc.
Does anyone know of a better way to execute this? Or perhaps a way to give the javascript priority (i.e. pages 0-3 are priority 1, pages 5-11 are priority 2, etc.)?
Thank you for your help in advance!!
As for the print order, the script just dumps the print jobs to the system. It's the system that decides what to do next. Ideally the jobs should line up in the order in which they are dumped. I suspect processing delays are the cause, the middle job has more pages so it takes longer to process and ends up at the end of the que.
From the Acrobat side there is no feedback on the print job so about the only thing you can do is setup a delay. Or use several smaller print jobs so that the processing takes less time.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script