Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Dynamic form needs to be saved as a flat/unmodifiable pdf

Avatar

Level 1

Hi All,

Please let me know what i can do!

I have enabled "Enable Additional Features" in acrobat to allow my dynamic pdf form to be saved. However, after being saved and reopenning the saved form in reader, the pdf is still dynamic and edits can to text fields or drop down lists can still be made. I need it to be saved as a flat pdf file.

I also have a "submit by email" button, programmed to email the filled out pdf to a particualr emailbox. Clicking the "submit by email" button, will attach the pdf, but unfortunately the file still allow edits.

Help please!

-KL 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

a XFA form cannot be real flattened by Acrobat nor Reader except by printing.

Another method is to set all fields access property to readOnly be scripting.

function lockFields(vNode) { 
    if (vNode.className === "field") {
        vNode.access = "protected";
    }
    for (var i = 0; i < vNode.nodes.length; i += 1) {
        lockFields(vNode.nodes.item(i));
    }
}
lockFields(xfa.form);

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

a XFA form cannot be real flattened by Acrobat nor Reader except by printing.

Another method is to set all fields access property to readOnly be scripting.

function lockFields(vNode) { 
    if (vNode.className === "field") {
        vNode.access = "protected";
    }
    for (var i = 0; i < vNode.nodes.length; i += 1) {
        lockFields(vNode.nodes.item(i));
    }
}
lockFields(xfa.form);