Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Generating PDF using Document of record(DOR options) in adaptive forms

Avatar

Level 1

We have requirement to generate PDF automatically from Adaptive Form. We are using non XFA form to generate the PDF.

Below is flow we are trying to generate the pdf with reference from https://helpx.adobe.com/aem-forms/6-1/generate-document-of-record-for-non-xfa-based-adaptive-forms.h....

FLow-PDF gen.png

The steps followed are:

1.Created a form using No form model and checked the option for generating the document of record in advanced tab.

2.Used the method GuideUtils.getDoRTemplateRef(afPath, locale.toString(), resource.getResourceResolver()); to get the reference for the XDP file generated using the form.

3.From this path of XDP and using the outputService api method (Document generatedDocument = outputService.generatePDFOutput(xdpDocument, dataDocument, pdfOptions);)in aem generated the PDF.

The issue is that the PDF which is getting generated doesn't have the styles that have been applied on the forms and it comes as a plain pdf.

0 Replies