Attachments on DoR

Somnath_Mookerj 27-12-2016

Using AEM Forms, I am binding an Adaptive Form with a XDP template created using designer for DoR. Requirement is, on AEM Forms, if I attach some image files, those images should be displayed on the Review PDF (DoR PDF). I cannot see even the attachment and what I see DoR might not support attachment component display, or attached images displayed on generated PDF.

In addition, say I have a process of 5 steps each step being a form. Therefore, I have 5 forms for the process. In the end user can review the consolidated data from 5 forms including attachments and can also go back and update some data and review again. How to create this consolidated data view in read-only mode ?

Thanks in advance !

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (1)

Answers (1)

workflowuser
Employee
24-01-2017

You can accomplish this, but you will have to write some custom code. The steps to do this are as follows

The images that are added to AF as attachments are stored in tmp/fd/... location

you will have to create base64 encoded string from this image

then you will have to create an xml and in that xml you will have to add the base64 encoded string value as element value

then merge the xml data with the DOR template using output service to get the pdf

a sample is listed here

Login using your facebook account, then click on the left "<" arrow on the carousel to go the last entry in the carousel. There you will find "Image in AF" sample. You can upload the image in the 3rd panel and on submission you will get PDF with the image in it.