Dears,
I use the Adobe Form Designer application to create a static pdf document. More precisely, the following version:
Adobe Experience Manager - Forms
Version 6.4.0.20180228.1.932123 Cipher:128-bit
[2003-2018]Adobe Systems Incoporated and its licensors
This pdf document will enable users to fill in fields whose values will then be extracted using a Java application.
On our PDF form, we've inserted a dedicated Save As button to validate mandatory fields.
We'd like to prevent form users from bypassing these validations by using the following toolbar commands or menu options
File --> Save
File --> Save As
File --> Print
To manage validations, I use Shows Events with Scripts, Language Javascripts, Run at Client.
Could you tell me how to disable the toolbar commands and the Save, Save As and Print menu options?
I've used the scripts below but none of them seem to produce the desired result ( example of PDF filein attachment ) :
Views
Replies
Total Likes
You can't disable the save features of the PDF viewer at all and hiding menu items would only be possible with a script in a so called a folder level which is inpossible to archive from within a form (= document level). More on script contexts here: https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsdevguide/JS_Dev_Contexts.html
Printing can be blocked by a script in the prePrint event of any element in the form itself.
xfa.event.cancelAction = true;
Views
Replies
Total Likes
Thank you radzmar ,
I confirm that the given script (to be inserted in the prePrint event) has correctly blocked the print action. Once the user has clicked on the Print menu/command, the system displays the Print cancelled alert.
As you mentioned, if it's not possible to disable or hide the Save and Save As menu, would it be possible to block the Save action as is the case with an action on the Print menu/command?
Views
Replies
Total Likes
No chance. The save command can't be stopped from being executed by design.
Views
Replies
Total Likes
Thank you again for your feedback.
It's a real shame. I really want to check that the mandatory fields are validated before the pdf form is saved.
1- Would you have a suggestion (as an alternative to my original idea, which was to disable or hide the Save and Save As menus) so that fields considered as mandatory in the form are checked before allowing the pdf form to be saved?
2- I wonder what purpose the preSave and postSave events serve in the Adobe Form Designer_V6.4.0.20180228 tool?
Thank you again
Views
Replies
Total Likes
I can't think of another solution, that would help you. The preSave and postSave events are there to execute scripts in that scenarios, like hiding or showing elements or such things.
Views
Replies
Total Likes
Views
Likes
Replies