Hi experts
Is there any way to prevent save and print options based on conditions.
Example:
if(textfield1.rawValue == "user1")
{
// this pdf should not be saved and should not be printed
}
is there any way to achieve this?
Thanks
Regards
arul
Solved! Go to Solution.
Views
Replies
Total Likes
The saving cannot be stopped by the cancelAction or other methods.
The older LiveCycle documentation indeed says it is possible with the preSave event, but it's was a bug of the documentation.
Here a comment from Stefan Cameron's blog:
http://forms.stefcameron.com/2008/04/13/prevent-printing-pdf-forms-in-acrobat-8/
preSave: Failed validations will not prevent the form from being saved however Acrobat/Reader will issue a special warning message, after issuing the validation error message, to inform the user that the validations failed. I’m guessing this is because the user may be saving the form to continue filling it at a later time so the save can’t be completely prevented.
Views
Replies
Total Likes
You cannot prevent saving but printing.
How to do this is described here: http://forms.stefcameron.com/2008/04/13/prevent-printing-pdf-forms-in-acrobat-8/
Write the following code in the prePrint event of the form
if(txtUser.rawValue == "user1")
{
xfa.event.cancelAction = true; // this will prevent saving the form
}
Nith
Hi radzmar and $Nith$
Thank you so much for your codes i will work with this.
Thanks again
Views
Replies
Total Likes
Just be careful with cancelAction as there is a bug in Reader 10.0 where cancelAction cancels all your code not just the action it is assigned to. See this thread: http://forums.adobe.com/message/3852614#3852614
Views
Replies
Total Likes
Hi $Nith$
I have just workout your code but it wont works for me. can you please look into this file. since this is a dynamic PDF form only.
http://www.4shared.com/document/GJoXSkUF/test.html
Views
Replies
Total Likes
The saving cannot be stopped by the cancelAction or other methods.
The older LiveCycle documentation indeed says it is possible with the preSave event, but it's was a bug of the documentation.
Here a comment from Stefan Cameron's blog:
http://forms.stefcameron.com/2008/04/13/prevent-printing-pdf-forms-in-acrobat-8/
preSave: Failed validations will not prevent the form from being saved however Acrobat/Reader will issue a special warning message, after issuing the validation error message, to inform the user that the validations failed. I’m guessing this is because the user may be saving the form to continue filling it at a later time so the save can’t be completely prevented.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies