0

I'm in desperate need of help. I've been working on a pretty intense PDF form and I keep getting it almost to where I want it. Then, I test the form and try to digitally sign it, I get smacked with this error:

This document cannot be signed in its current state. Please save the document, close it, reopen it, and then attempt to sign again.

Once that happens, nothing I do can recover the form. I've deleted every field, JavaScript, and piece of text or image from it. I've started from scratch 3 times now and I keep running into it.

The most frustrating part is that I have no idea why this keeps happening. And finally, this third time around, I've ended up with a file balanced on a knifes edge: The form works perfectly unless you unselect the first checkbox. You can select any of the other checkbox "options" (like a radio button of sorts), but unselecting the checkbox or resetting the form triggers the error.

Fortunately, I have a saved version right before I ended up here and the only difference between the two is four lines of JavaScript that I added. None of which involve the signature.

I don't know where to go. I've searched high and low on the internet and have found no answers or even similar questions. I assume I need to get deep into the guts of this PDF and manually decompile and fix it. But I don't know how to do that.

Can anyone point me in a useful direction?

AzureSkye
  • 23
  • 7
  • 1
    Can you share the two pdfs, before and after that specific change? Or at least show the js change you did? Probably related: [this question&answer](https://stackoverflow.com/a/56584466/1729265). – mkl Feb 21 '21 at 06:34
  • I added these 4 lines to an If/Else statement. Removing them doesn't make things work, however. If: `this.getField("DoDID").setAction("Validate", "DoDIDCheck(event);");` `this.getField("DoDID").charlimit = 10;` Else: `this.getField("DoDID").setAction("Validate", "");` `this.getField("DoDID").charlimit = 23;` Additionally, here's copies of the worksheet. I've tried to purge any ID'ing info from them: https://drive.google.com/drive/folders/1H7UzBFkrjLP1aB2iBoZAKoEJsvEso-L1?usp=sharing – AzureSkye Feb 21 '21 at 12:29
  • 1
    Well, just like in the previously referenced [q&a](https://stackoverflow.com/a/56584466/1729265) you change an `Action` of a field using JavaScript. Apparently Adobe does not accept a document with such an in-flight change for signing. which makes sense as the changed action would not be saved during signing, so the signed document would not behave like the document the user saw while signing. – mkl Feb 21 '21 at 13:55
  • My mind boggles. I don't understand why that isn't listed in the SDK or other documentation! Once I changed that, saved and reloaded, it works again. When I first tried your solution, I had skipped the "Save & reload" step and that didn't work. Thank you! – AzureSkye Feb 21 '21 at 15:00
  • Great that it works now. Shall we close this question as duplicate of the referenced question? – mkl Feb 21 '21 at 15:13
  • Please. Thank you again for the help. – AzureSkye Feb 21 '21 at 15:43

0 Answers0