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.

Programmatically merge XML data into PDF form

Avatar

Level 7

I would like to programmatically merge XML data, returned by the server, in a PDF. I tried to return the XML as a string and bound it to a text field and it still didn't work.

How can I make this happen?


Aditya

4 Replies

Avatar

Former Community Member

What kind of service are you using to retrieve the XML?

If you are using a Web Service that returns XML as a string you can bind the string in the invokeResponse directly to a text field. For example,

Untitled.png

The binding produces populates the text field with XML.

Untitled1.png

Steve

Avatar

Level 7

Thanks Steve!

I could do that. However, I want to populate other fields of the form from the XML response... First of all, should I return the XML as a string?

Aditya

Avatar

Former Community Member

Aditya,

If you LiveCycle Forms ES or LiveCycle Forms ES2 you use the Forms service renderPDFForm operation to merge data with a .pdf or .xdp. This could apply to a form rendered in Workspace or a process invoked through the Java API.

Again, what services or technology are you using to access the XML?

Steve

Avatar

Level 7

I don't think I am explaining myself correctly.

The form needs to make a call to the server using WSDL. The server pulls information from the database and assembles an XML which is returned to the client PDF. This data needs to merge with the form on the fly. I am able to bind individual fields and pre fill the form. However, I want to know how to pre fill the fields from the returned XML.

The service is the PDF (client) and ES Server (JAVA).

Aditya