Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

JavaScript disallowed on certified form?

Avatar

Level 7

I have a dynamic form that is submitted using an HTTP Submit Button (pdf). The server responds with an FDF payload of JavaScript that gets executed immediately. This works fine when the form is not certified. However, once the form is certified (non visible), instead of running the JavaScript on submit, a popup says "operation is not permitted". Is there a way to return JavaScript to execute within a certified document? Using Designer ES4 and Adobe Acrobat Pro XI.

JavaScript FDF.png

JavaScript FDF General Error.png

Sample FDF:

%FDF-1.2

1 0 obj

<< 

/FDF

<< 

/JavaScript << /After ( JavaScript Goes Here ) >>

>>

>> 

endobj

trailer

<< 

/Root 1 0 R

>> 

%%EOF

4 Replies

Avatar

Employee

Nicholas,

The trust settings on client side (Acrobat/Reader) need to be set appropriately.

For Acrobat XI :

  • Open Acrobat
  • Press Ctrl+K
  • Select Signatures on left hand side panel of Preferences dialog
  • Click More button under Identities and Trusted certificates
  • Select the CA of the credential that is being used to certify the PDF in question
  • Click Edit Trust
  • In the Trust Tab enable embedded high privilege JavaScript
  • Close Acrobat & Browser

Now try the scenario again...

--Santosh

Avatar

Level 7

Hi Santosh,

Thank you for your response. I tried assigning all rights to the Adobe Root CA (which my cert chains up to), but am reciving the same error.

root ca.png

Avatar

Employee

Nicholas,

Is the PDF in question certified by an identity whose Root CA is Adobe? If not, corresponding Root CA needs to be imported and then trusted.

--Santosh

Avatar

Level 7

Hi Santosh,

In this case, the PDF was signed by GlobalSign which chained up to the Adobe CA.

Note that the following FDF payload works:

1 0 obj<</FDF<</Status(Some Kind Words Here)>>/Type/Catalog/Version/1.3>>endobj trailer<< /Root 1 0 R >>%%EOF

It appears that the simple inclsion of the JavaScript key is enough to cause the error message.

Here is what my submit button looks like (xfa)

<field name="HTTPSubmitButton1" y="76.2mm" x="82.55mm" w="28.575mm" h="6mm" relevant="-print">

            <?templateDesigner isHttpSubmitObject true?>

            <ui>

               <button highlight="inverted"/>

            </ui>

            <font typeface="Arial"/>

            <caption>

               <value>

                  <text>Http Submit</text>

               </value>

               <para hAlign="center" vAlign="middle"/>

            </caption>

            <border hand="right">

               <edge stroke="raised"/>

               <fill>

                  <color value="212,208,200"/>

               </fill>

            </border>

            <bind match="none"/>

            <event name="event__click" activity="click">

               <submit format="urlencoded" textEncoding="UTF-8" target="http://localhost:51786/Submit/TestFDF#FDF"/>

            </event>

         </field>

        

Let me know if you need anything else to diagnose this issue.

Nicholas.