Copy link to clipboard
Copied
I'm building a multi-page form in Acrobat DC that has fields with multiple colors based on manual inputs, calculated totals, locked fields, pre-entered text and #s, etc.
I need to find a way to make all the field colors transparent only when the document is printed. I've tried to use the following code in the "Will Print" document action, but it doesn't work with all the fields and it also doesn't bring back the field colors after printing.
for(var i=0;i<this.numFields;i++)
this.getField(this.getNthFieldName(i)).fillColor = ["T"];
Your help is VERY VERY VERY much appreciated and I'm grateful to you for your time.
Thanks in advance,
-Jonathan
Copy link to clipboard
Copied
It should work with all the fields... Which fields is it not working with, exactly?
To change it back you need to use the Did Print event, and change your code to apply back the original fill color.
If this color is not the same for all fields then it becomes more complicated, as you'll need to save that color into a variable (probably an array is the best option) in the Will Print event, and then apply it back in the Did Print event.
If it is the same color (probably white) then you can use the same code, adjusting the last part of it accordingly.