Hide Highlights and Document Will Close Java Script in PDF not working as intended
Hello all!
Java Script beginner here, not even really a begginer, I only ever used the one script below that I'm now having troubles with. So let me know if you need more info to be able to help with my question.
I recently created an editable PDF for a client that needed the highlights for editable fields removed. I used the standard Java Script to hide the highlights:
var rths = app.runtimeHighlight ;
app.runtimeHighlight = false ;
Then I also set Document Actions > Document Will Close to this:
app.runtimeHighlight = rths ;
to ensure that specific Java Script only works for that specific file. So, once that document was closed out of the highlights would show properly for all other files.
This worked for a while but at some point I noticed I stopped seeing highlights in all editable PDFs which shouldn't have happened because of the Document Will Close script. I'm not sure what happened in the process but I always used both scripts noted above as I was making edits to the file after client review.
Is there a Java Script to re-set highlights to visible? Or is there a different way for me to fix this?
Thank you!
