The WillPrint event is triggered after the Print button in the Print
dialog button is clicked, and before the file is actually printed.
This is not ideal, admittedly, as any changes the script will implement in
the printed file are not visible in the Print dialog, which can be
Thanks for your answer try67.
This is how I hoped it would work (nevermind the Print Dialog).
But for some reason, my "spawning" code does not work that way... As I said, document prints without the spawned page and then adds it.
Any idea why?
1 person found this helpful
My guess is it's an issue with the page range. If in the Print dialog it is set to print pages 1-3 and then you spawn page 4, it won't be included in the printed copy, even if it is created before it...
Hmmmm... sounds like a great guess.
Problem is that page range is set to "ALL".
Could than mean than somehow Acrobat stores "All pages" as a value based on the actual document and set it as a range...? No matter if pages are inserted or spawned before the actual printing.
That could make sense, and would explain the issue...
But that would also mean that I would be stuck on that one. Unless you'd have a brilliant idea to tweak this out...
Yes, that's what's probably happening "behind the scenes".
The only solution I can think of is to add your own "Print File" button to your file, which will execute the spawn method and then call the print dialog.
Custom print button is definitely an option, but well... doesn't prevent a user from printing directly.
As a matter of fact, I did ask this question for both helping an OP and for my own learning purpose to improve my Acrobat skills and understanding.
The question was asked here by an OP on the Indesign Forum, and I thought it was an interesting one.
Anyhow, thanks for you help, I did learn more about the Willprint event.