Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Save, send e-mail in plain PDF, not form.

Avatar

Former Community Member

Hi, I want to send/save my form in plain PDF, or other format html, jpg, gif....

I now that I can export, but don´t want users to send the hole form.

Can I set permission for that?

Pleas help

3 Replies

Avatar

Level 10

Hi,

Several options:

Paul Guerette has an excellent example of a button in a form, that will lock all fields. You would click this button as part of the sending process so that the form appears to be flat. See Re: Convert a dynamic pdf to a static pdf for commenting?

If you want to save to a different format, then you could also have a button with a saveAs script. However the user would have to select the format in the save as dialog.

app.execMenuItem("SaveAs");

If the user has Acrobat (or you are using Acrobat to send the form out), then you could print to PDF, this will also generate a flat PDF. Either of these javascript commands will open the print dialog; however the user will have to manually select Acrobat as the printer.

app.execMenuItem("Print");

OR

xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);

Hope that helps,

Niall

Avatar

Former Community Member

Thank you, for your reply.

I want user to fill out the form, and click on "send to e-mail" button. The receiver will then have an plain PDF file with information filled out, and not the form.

Here is what I am thinking about:

form1.#pageSet[0].Page1.#subform[0].Button1::click - (JavaScript, client)
var url = "mailto:email@server.com";
var sendAs = "XDP";
// Adding more packets for send.
var packets = new Array("datasets","pdf");
var doc = event.target;

doc.submitForm( { cURL: url, cSubmitAs: sendAs, aPackets: packets } );
// Adding look form.
myScriptObject.LockAllFields(form1);

Avatar

Level 10

Hi,

I think you would need to lock all fields first, then send form.

N.