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.

How to Pass XML Data to a PDF Form and Load it into form fields

Avatar

Level 2

I have xml Form data in a string. I would like open a programatically launch a pdf document and pass the xml data as one of the parameters and this xml data needs to load all the form fields.

Any Idea as to how this can be done?

6 Replies

Avatar

Former Community Member

If you are using ASP.net, C# or VB.net check out: http://www.fdftoolkit.net/

FDFToolkit.net can "Merge" XML data with LiveCycle XFA PDF forms. FDFToolkit.net is open-source.

If you are utilizing non-microsoft servers, then check out JAVA based iText. iText is open-source.

FDFToolkit.net also can convert XML to XDP data format.

Avatar

Level 1

I have the same requirement as Daminu, but from the research I have been doing it seems your reply is only partially true. 

If your PDF is an XFA PDF form, with Reader Extensions enabled, and you want to keep the Reader Extensions functionality for a user to use after your programmatic manipulation, then neither of these tools will work (FDFToolkit or iText).

Upon the user opening the file once it has been programmatically modified, the user will see the following:

XFA_PDF_RE.png

From what I have read, this requirement can only be fullfilled by use of LiveCycle Reader Extensions Server?  Please confirm?

Avatar

Former Community Member

FDFToolkit.net utilizes iTextSharp.

iText products have the ability to "RETAIN" the usage rights, but not create the usage rights.

After merging the data into a PDF using iText products, the PDF can still retains the usage rights, and the client won't see the message, "This document enabled extended features in Adobe Reader....".

Avatar

Level 10

Do you have Adobe LiveCycle server product installed?

If so, you can do it in a formal way as there is a service which merges the XML data with form template(XDP) and produce the PDF output.

If you have a blank PDF, you can import the XML data into the PDF.

In both cases, the form fields will all be prepopulated with the XML data provided.

Nith

Avatar

Level 2

Hi,

We do not have the server product.

I would like to merge the data on the a desktop windows computer without using third party (open source) tools.

I would like to programatically import XML data into a PDF document.

I would like to pass this xml data as a parameter or write the contents to a file on the c:drive, which can then be read by the pdf

Avatar

Level 2

I liked this answer provided by Paul http://forums.adobe.com/message/3913886#3913886

If the XML file is renamed as XDP and then its opened with windows association set to Acrobat.Exe it loads the data.