Expand my Community achievements bar.

SOLVED

Flatten or Lock a fillable pdf when user presses submit button

Avatar

Level 1

Hi.  I've been searching all over the net trying to figure this out.  I have a form that I created in LiveCycle and in the form I inserted a "REGULAR" button, with the following script:

//Create a variable to hold the document object

var

oDoc = event.target;

oDoc.mailDoc({

bUI

: true,

cTo

: "whoever@wherever.com",

cSubject

: "New Procedure - Operator "+TextField1.rawValue+" - ID "+TextField2.rawValue,

cMsg

: "Attached is the New Procedure form for Operator "+TextField1.rawValue+" - ID "+TextField2.rawValue+".",

});

This script is emailing to "whoever@wherever.com" and populating the subject line and body of the message with some text and some items from fields in the PDF.

I want to have the PDF locked or flattened when the user hits the submit button, to ensure that the information put in the PDF isn't altered after they submit it.  I cannot find any way of doing this easily.  I found a script that will flatten the message (below), but I don't know how to add it to the email script I have noted above.  I don't want to add a second button to the form as I want to keep it as simple as possible for the user.

Any suggestions someone might have would be greatly appreciated.  Thank you.

Ryan

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 1

Radzmar,

I went to the link and it looks like it might have what I'm looking for... however, when I click on the link for the example it takes me to an adobe page with no example PDF.  Do you know where I would find the example PDF?  Any help you can provide is greatly appreciated.  Thank you.


Ryan

Avatar

Level 10

The link at the bottom of the blog post takes you to Acrobat.com where you can download the file.

Just tested it, the lin k is working fine for me.

Unbenannt.jpg

Avatar

Level 1

Radzmar,

I got it to work.  Thank you so much for your help, it is greatly appreciated.  This works perfectly!