Copy link to clipboard
Copied
This is about Adobe Reader DC run from WIndows computer.
A pdf is on the user desktop, and user open it with his Adobe Reader DC
In the File Print dialog, there is as "Save Toner" checkbox.
When it is selected, the pdf document events WillSave and DidSave are triggered
This never happens when it is not selected
Moreover, it seems that this causes some reloading because the global var are reset to the original values.
Steps to reproduce the problem
Add a javascript document with the code
var testvar = 0;
Add a print button with the code
testvar = 1;
console.println("in print button: "+testvar.toString());
this.print(true); //show the ui print dialog
console.println("out print button: "+testvar.toString());
Add a WillSave event with the code
console.println("unexpected call to will save: "+testvar.toString())
Add a DidSave event with the code
console.println("unexpected call to did save: "+testvar.toString())
Add a WIllPrint event with the code
console.println("in will print: "+testvar.toString())
Add a DidPrint event with the code
console.println("in did print: "+testvar.toString())
Save the form on your desktop close and open the form from the Reader X program
Click on the button on the form and do not select "Save Toner"
The console will show, as expected
in printbutton 1
in will print: 1
in did print: 1
out printbutton 1
Now click on the button on the form and select "Save Toner"
The console will show
in printbutton 1
unexpected call to will save: 1
unexpected call to did save: 1
in will print: 0
in did print: 0
out printbutton 0
Copy link to clipboard
Copied
This is about Adobe Reader DC run from WIndows computer.
A pdf is on the user desktop, and user open it with his Adobe Reader DC
In the File Print dialog, there is as "Save Toner" checkbox.
When it is selected, the pdf document events WillSave and DidSave are triggered
This never happens when it is not selected
Moreover, it seems that this causes some reloading because the global var are reset to the original values.
Steps to reproduce the problem
Add a javascript document with the code
var testvar = 0;
Add a print button with the code
testvar = 1;
console.println("in print button: "+testvar.toString());
this.print(true); //show the ui print dialog
console.println("out print button: "+testvar.toString());
Add a WillSave event with the code
console.println("unexpected call to will save: "+testvar.toString())
Add a DidSave event with the code
console.println("unexpected call to did save: "+testvar.toString())
Add a WIllPrint event with the code
console.println("in will print: "+testvar.toString())
Add a DidPrint event with the code
console.println("in did print: "+testvar.toString())
Save the form on your desktop close and open the form from the Reader X program
Click on the button on the form and do not select "Save Toner"
The console will show, as expected
in printbutton 1
in will print: 1
in did print: 1
out printbutton 1
Now click on the button on the form and select "Save Toner"
The console will show
in printbutton 1
unexpected call to will save: 1
unexpected call to did save: 1
in will print: 0
in did print: 0
out printbutton 0
Copy link to clipboard
Copied
I doubt it's a bug. Probably as intended, but undesirable. My wild guess is that to save toner Acrobat makes a new document, which prints with less toner, and saves it. So you have a freshly saved and opened version of the file. Your script has to deal with this somehow.