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

SOLVED

Attachments on DoR

Somnath_Mookerj
Level 1
Level 1

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 !

1 Accepted Solution
workflowuser
Correct answer by
Employee
Employee

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.

View solution in original post

1 Reply
workflowuser
Correct answer by
Employee
Employee

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.

View solution in original post