Adaptive Form - Output Service Embed File Attachments into Document of Record | Community
Skip to main content
Level 4
July 11, 2022
Solved

Adaptive Form - Output Service Embed File Attachments into Document of Record

  • July 11, 2022
  • 4 replies
  • 969 views

Hello,

 

I would like to confirm if file attachments can be embedded into Document of records generated by the Output Service. The attachments should be embedded into the PDF file itself, and not show as separate pages.

 

The use case is as follows:

 

  1. The adaptive form is created with XML Schema and XDP template. The Output Service API will be used to generate the Document of Record PDF.
  2. In the adaptive form, there are file attachment buttons to upload word/pdf files. There can be many attachments.
    1. Upon uploading the files, there is a hidden field in the adaptive form containing the temporary path to the attachments.
    2. These paths are sent to the servlet to be combined with the DOR.
  3. Once the form filling is complete and files are uploaded, the user clicks the submit button. Data is sent to the servlet to generate the PDF. After the PDF generation, the attachments from the adaptive form should be embedded into the PDF as file attachments.

Is a use case like this possible with the Output Service and other libraries available in AEM?

 

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MorisMonk

We have done similar before, and you would also use the Assembler Service as well.
https://experienceleague.adobe.com/docs/experience-manager-65/forms/use-document-services/assembler-service.html?lang=en

 

4 replies

MorisMonkAccepted solution
Level 4
July 11, 2022

We have done similar before, and you would also use the Assembler Service as well.
https://experienceleague.adobe.com/docs/experience-manager-65/forms/use-document-services/assembler-service.html?lang=en

 

Pulkit_Jain_
Adobe Employee
Adobe Employee
July 12, 2022

@techddx 

File attachments are embedded (and not as separate pages) with the output Document of Record OOTB. If this is a particular use case, then you can leverage this feature.

Although the Document of record is not supported for XFA-based or adaptive forms with Form Template as form model otherwise, you can follow the suggestion provided by @morismonk and let us know if you're stuck

 

Pulkit_Jain_
Adobe Employee
Adobe Employee
July 13, 2022

@techddx 

File attachments are embedded (and not as separate pages) with the output Document of Record OOTB. You can leverage this feature if this is a particular use case.

Although the Document of the record is not supported for XFA-based or adaptive forms with Form Template as a form model, you can follow the suggestion by @MorisMonk and let us know if you're stuck.

Mayank_Gandhi
Adobe Employee
Adobe Employee
July 14, 2022

@techddx since you have servlet take dor and attachment and call the assembler service. @morismonk suggestion is pretty valid in the case.