Using "this.external" throws "InvalidGetError" when file is digitally signed
Hey guys, I've got a bit of a weird bug that is driving me completely insane.
I have a form that checks if PDF is being opened in something other than Acrobat using "if(this.external){"
Until recently, this worked perfectly. If the form was opened in Chrome or something else, an error would pop up and the form fields would stay hidden.
However, sometime between July and now, this stopped working, but only when the forms are digitally signed.
Reproduction:
1) Document-level script executes "if(this.external){//unhide form fields}" on document open.
2) User fills form and uses digital signature field to sign.
3) User emails form to my team.
4) My team opens the form and "//unhide form fields" doesn't execute, with this error in the console:
"InvalidGetError: Get not possible, invalid or unknown.
Doc.external:3:Document-Level:zOpenDoc"
In my testing, I found that removing the "this.external" check would also result in an error when the script got to the "this.delay = true" line, however "this.dirty = false" works fine.
I'm beyond frustrated and confused dealing with this. Is this a genuine bug with Acrobat or is this a coding error on my part?
I would greatly appreciate any help that points me in the right direction.
