Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 5
4 Replies

Avatar

Correct answer by
Level 5

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-...

 

Avatar

Employee

@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

 

Avatar

Employee Advisor

@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.

Avatar

Employee Advisor

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