• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Why Adobe Disabled the JavaScript Submit button When Secure a document with password ?

Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Hi,

I Just wonder why adobe prevent developers that write submit javascript code (Acrobat Pro DC) from distributing secured pdf document with working (Submit Button) ? what they getting at ? what the reason? can't figure why.

Best
Mohammad Hasanin
TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 27, 2017 Nov 27, 2017

There are a couple of different ways to approach a solution. One method is to have the users manually save the form and email it back to you. This works on most platforms, even on mobile.  It works because Acrobat Reader can save a filled form, and its the user's problem to get it in the email.

The other method is to submit to a server, which requires something on the server end to catch the data. There are ways to write a simple server script that converts the form data into an email attachment

...

Votes

Translate

Translate
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Are you using the "Distribute Form" feature in Acrobat?  This is a highly controlled workflow with specific requirements. Any change you make to a PDF form in this workflow will cause issues.

Other than this. Securing documents can block all kinds of actions.  The type of security you applied might disable form filling for example. How is your document secured?

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Hi Eng.Thom

i  fellow your tutorials in developing Push Button to Submit the mail, and after a lot of hard work in coding my own system in sending mail then i shocked completely after securing the PDF form document (i didn't use "Distribute Form" feature in Acrobat) , also today i just updated my Acrobat Pro DC from ver 2015 to 2018 , i hope it will be different but i suspect to find any change in this area, also after reading many old articles in Acrobat user forum i found that the maximum solution is trying to use "Distribute Form Feature in Acrobat, this will give me feeble Protection to my file but any professional user will easily choose (save a copy) and all the file willbe with his hands, I'm so confused why Adobe doing that! what is the relation between sending data via mail and blocking this features when securing document, its funny that you mention the many actions can be blocked!, OMG!, thanks for your reply and i hope to suggest me any suggestion!

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

also i want to add that my form can be filled completely with no problem, i choose to develop a button that will submit the FDF file - Data only not all the PDF- everything was working fine and after many tests i decide to protect my PDF form and i shocked!, the submit button doesn't work!

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Look at the document properties for the protected form. On the security Tab, are any features listed as "restricted"?  The type of protection you choose determines the types of restrictions. This is after all the purpose of protection. How did you protect the PDF?

The fact is that you cannot protect a document that will be used. In order for someone to view the PDF, it has to be open to them, so they can always save a copy.

The best protection is to only distribute the form to trusted users. In this case you can encrypt the PDF with a Public/Private key scheme. i.e. a digital signature/certificate.  The user's hold the private key, and you encrypt with the public key. Only these users will be able to view and submit the form. This doesn't work for generally distributed PDFs.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Hi ,,

I protect the PDF with the following procedure :

1- i select the properties (ctrl+d) then choose SECURITY Tab

2- i select (Password Security)  then i put mark in front of (restrict editing and prinitng....etc)

3- i let the user to print (High Quality) version because the form is (Certificate) also in front of changes allowed i select (Commenting - filling in form fields and signing....etc).

4- in Compatibility i select (Acroabt X and Later) . after that i put the password and save the document...

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

So you do not allow form filling? That is your problem as we have said. Also, be aware that this security is worthless because much software ignores it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

I did some basic testing and didn't see this issue. Can you post the form, or a simple version for testing?

It's possible that using the client email is the issue. i.e. the email submit. This was never a good way to submit, and it's much worse today since most users have web mail.  Do you know that your users do in fact have email clients that will work with the submit?  Otherwise you should consider submitting in a different way.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

You know, you can submit a PDF form directly to Google Sheets.  It's tricky, but can be done.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

hi thom...

here is a link to download example of my submit code and see the two files (the fist one non secured runs only in acrobat pro ) - (the other one secured doesn't submit at all) - you can read the code with your self and see, download from the following link :

PDF Test - Google Drive

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

Security is definitely blocking the "this.mailForm()" function. This feature has more security on it than other submit functions because it interacts with the local system. You'll note that in the reference it is marked with Reader Form Rights (F). So it won't work on reader unless the PDF is enabled with Form Rights. Not very useful. Between local access restrictions in Acrobat JS and the scarcity of client email programs I think that submit by email is dead, unless you have a small group of known users. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

yes, only small groups for about 4 or 6 users will benefit from this feature, so what do you suggest for workaround ? i will cancel the security and distribute the form so they will not accidentally change the document but i think mailing to server maybe will be the solution

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

There are a couple of different ways to approach a solution. One method is to have the users manually save the form and email it back to you. This works on most platforms, even on mobile.  It works because Acrobat Reader can save a filled form, and its the user's problem to get it in the email.

The other method is to submit to a server, which requires something on the server end to catch the data. There are ways to write a simple server script that converts the form data into an email attachment and send it to you. I like this one for small setups because you don't have to muck around with managing data on the server.  But it's also outside the scope of this forum.

There are also services such as Form Router that do all the backend stuff for you.

You can also submit directly to google sheets, but this is tricky to setup.  The idea is to create a google form connected to a sheet, then name all your form fields for fields in the google form. Basically trick google into thinking its' the gform that's doing the submit

A better way to connect to google sheets is to write a google app to do it. This is something I've been meaning to do, but I'll get to some time

Data handling can be a pain because it requires some kind of external entity to handle the data transfer. You either have to spend some time working on it or pay someone else.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 28, 2017 Nov 28, 2017

Copy link to clipboard

Copied

LATEST

Thank you very much, i also think in rebuild the form using Adobe Live Cycle, some people told me its much convenient , i didn't use it really, but maybe i will not if it not support Arabic, my certificate form is (English/Arabic) Form - Double Fields for each data, anyway thank you very much for your valuable time and efforts.

Best
Mohammad Hasanin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines