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

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

Level 1
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

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