Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Merging data from a CSV file into a PDF Form

Avatar

Former Community Member
Hello all,



I have a 4-page PDF file. I need to print out this document for 4000 employees. However, I need to put the employee's name and address at the top of the document. I have a CSV file and an XML file with all of the names and addresses but I am having trouble merging this file into the PDF document.



Here is what I have tried so far:



1. I went into Adobe Designer 7.0 and I created a form using my document.



2. I then mapped my form fields to my XML file.



3. I went into Acrobat 3D and then went to Advanced-->Forms-->Import Data to Form.



I can get the first employee to appear on the document but how do I get Acrobat to cycle through all 4000 employees in the file and create all 4000 documents? Basically, I need this process to continue for each employee essentially creating 4000 4-page documents.



If Acrobat or LiveCycle cannot handle this, can anyone think of how this could be handled using a different product?



Thanks in advance!
1 Reply

Avatar

Former Community Member
I don't understand what the CSV file is for... but you can do this using the LiveCycle Forms API. Basically, you would write code that would:



1) Load the entire XML file into a DOM

2) Loop through each entry in the DOM

i) Create a new DOM consisting of just the information you want for that particular PDF.

ii) Pass the new DOM and the XDP template into the Forms API to create the PDF.

iii) Do whatever you want with the PDF



Chris

Adobe Enterprise Developer Support