Exporting Form Data Into Separate PDF Document

SafetyMan1989

30-03-2016

I'm still very new to LiveCycle and I'm editing an existing form for our company. When the form is filled out and sent back to us by cients, we take the information in that form and put together a word doc (a templated document that's almost the same for each company, except the personal info and dates/ account info is changed). We convert the word doc to PDF then attach it as an email to the client.

Right now we just manually copy and paste the info from the form (address, name, date, and a few account details) into the body of the word doc then save as pdf. What I'd like is to have a button in the form, something like 'Build Letter to Client' which essentially builds that document for me and converts into PDF. I can build a hidden subform within my form and populate the letter with the information the client inputs, but how do I then export just that subform as a separate PDF file? Is that even possible?

Or am I going about this the wrong way-- should the templated PDF doc be a separate file that then uses data from my form to fill in the fields, like a mail merge type function in Word?

If anyone has a link to a form/ forum post/ adobe article that explains how I could do this it would be greatly appreciated!

Accepted Solutions (0)

Answers (4)

Answers (4)

_Bruce_Robertson

MVP

25-11-2016

Hi,

There is also a Report object in Acrobat JavaScript, it doesn't give you as much control over the look of the PDF but is probably easier to setup, at least if you don't know much about AcroForms.

Here's a example that takes a few fields creates a PDF and generates an email with the PDF as an attachment.

https://sites.google.com/site/livecycledesignercookbooks/home/Report.pdf?attredirects=0&d=1

Regards

Bruce

Archyron

22-11-2016

The key to this is to create an AcroForm PDF template to store your data. Then you can open that file and write in the data.

var doc = event.target;

// This opens the AcroForm. It must be contained in the same directory as the XFA form.

var reportDoc = app.openDoc({

  cPath: "Template.pdf",

  oDoc: doc,

  bHidden: false

});

//Fill in the field values

reportDoc.getField("fieldName").value = "formData";

skate2k5

31-03-2016

For the momenti, you could use the distribution module ( File - Deal Module ) ; when users fill out the pdf you send it attached to an email . Then collect the data through xxxxx-distributed.pdf , then export all in a new pdf .