Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Writing data programmatically into PDF template created in LiveCycle designer

Avatar

Not applicable
Hi!!!



I have a PDF template designed in Adobe LiveCycle Designer 7.0. This template has form fields which needs to be filled with data programmatically (I don't want to open LiveCycle Designer 7.0 and from there do import/export). I want to write a program in java, which will fetch data from database and will merge this data into PDF form in respective fields.



How this can be achieved? Do I have to write an XDP file? Is there any API which will create XDP out of the PDF template created in designer? If so, then how to merge the data from the XDP into the PDF programmatically.



Thanks in advance.



- Shriram
10 Replies

Avatar

Not applicable
Shriram,



My company, Viga Technologies, has recently developed an object which converts XDPs to PDFs automatically. It can be deployed as a server side object to be incorporated into existing applications or it can be run as a service by us on a per-form basis. The engine consumes XDPs and also allows the user to pass an XML data file to populate the form. It is windows based and developed under the .net framework, so java may be an issue. For the use you have described above you would simply feed the engine your Designer generated XDP and also in XML the data that you want to merge into the final PDF. If you have any questions, please feel free to contact me.



Adam Wachtel

Viga Technologies (http://www.vigatech.com)

awachtel@vigatech.com

(678)371-4401

Avatar

Not applicable
Shriram,



The Adobe Livecycle Forms is a server-based product to programmatically generate PDFs. It has to be deployed in J2EE application server. It provides java API to render templates designed using Livecycle Designer as PDF/HTML, prepopulate forms with data and extract data from forms submitted online. For further information you can refer to adobe's website on livecycle forms.



Regards,

Veeresh

Avatar

Not applicable
If I correctly understand what you're trying to do then Adobe XPAAJ should be adquate:



http://www.adobe.com/devnet/livecycle/downloads/xpaaj.html



Below is a link to a "video" demonstration of building an application that uses XPAAJ:



http://www.flexlive.net/?p=37



(I don't think your question about having to write an XDP file is crucial to what you're trying to do, but you don't need to write an XDP file -- it is a "save as" option within Designer. You can save a Designer file as either PDF or XDP. Or both, one after the other, if you need both.)

Avatar

Not applicable
Justin,



Good warning, but the EULA has been updated a bit to include Flex and Cold Fusion. So basically you need to a own a license of a server based LC product, Flex, or Cold Fusion to use XPAAJ.



Chris

Adobe Enterprise Developer Support

Avatar

Level 1

Hi,

I have a similar requirement. I have created the form in Adobe live cycle designer 7.1.

My requirement : Using Java i have to fill some fields on the form. How can i achieve this ?

Any pointers on this would really help me.

Thanks,

GNS

Avatar

Not applicable
Hi all,



I have the following requirement in my project

1) Strip the XML(the answers) out of PDF.

2) Update certain sections of the XML.

3) Merge it back with the pdf and render the final document to the users.

All the above steps need to be done programatically, i.e., with out opening the pdf manually.

We are using a .NET application. I guess we have XPAAJ utility for step 1. But this is a java based API. Is there any .NET equivalent?

Also, can anyone guide me for step 3. Any pointers to this will be most appreciated and helpful.



Thanks,

Sreeraam Mohuna.

Avatar

Not applicable
OK... there is the VB JSObject in the Acrobat 8 SDK ( http://www.adobe.com/devnet/acrobat/ ) that can be used in a .NET context. Rememeber that you cannot change the PDF while using Acrobat other than signing a digital signature field, adding an annotation and the import and export of form data (XML in the case of Designer based forms). Take a look at this link from another Forum thread for a raw code example:

http://www.adobeforums.com/cgi-bin/webx/.3bc2919a/5



Now go look at the Acrobat 8 SDK and look in the Interapplication Communication API Reference, the JavaScript for Acrobat API Reference, and Developing Applications Using Interapplication Communication (particularly the section titled "Using the JSObject interface") documents.



~T

Avatar

Level 6
Hello,



Here are my opinions:



I have the following requirement in my project:



1) Strip the XML(the answers) out of PDF.

» Submit it (the data as a xdp file) to a web server.



2) Update certain sections of the XML.

» Standard xml processing on the server side...



3) Merge it back with the pdf and render the final document to the users.

» Send the changed xdp file/stream to the users.

Avatar

Level 10

I know that this is an old thread -- but programmatically merging data with PDF forms using LiveCycle ES is very easy. Basically if you want to create a non-interactive PDF document, then you can use the Output service. If you want to create a PDF that lets users modify form fields (an interactive PDF form), then use the Forms service. There is a discussion on how you can do this task in Programming with LiveCycle ES. You can access this topic at the following URL:


http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000348.html

This uses the Forms service - but the focus of the topic is really about creating an XML data source at run-time to merge with the form.


This topic uses classes located in the org.w3c.dom.* Java package to create a dynamic data source to merge with the PDF document.