Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Render dynamic PDF Form with attachments

Avatar

Level 1

Hello,

I try to render en PDF Form based on an XDP document (dynamic form) with ES3 Forms Service Client java API (using renderPDFForm method).

A problem occures with attachments.

When plain/text (or an application/xml) files are attached, it's OK: the PDF form is rendered and.txt and .xml attachments are added (renderer by acrobat reader).

But when i try to render a pdf form with multiple attachment types like pdf and msword files: it does not work even if I change the file extension or content type (from application/pdf to application/octet-stream or plain/text) of the "attached" Document.

The rendered pdf form is corrupted and cannot be rendered by Acrobat Reader.

Adobe reader says that the file is damaged and cannot be repaired.

Thanks !

1 Reply

Avatar

Former Community Member

I am attaching multiple files to a dynamic PDF in ES2. I did have an issue where the server was running out of heap space in renderPDFForm. The error was in the server log. I changed the JVM settings per: http://blogs.adobe.com/livecycle/2007/10/tuning_the_sun_hotspot_jvm.html and also changed the way I was creating the Map of com.adobe.idp.Documents such that the Documents were on disk instead of in memory.