Sign in to Community
Sign in to view all badges
Expand my Community achievements bar.
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....
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.