I need to run through a bunch of XDPs (on a filesystem) and convert them to flattened PDFs (for print).
We have AEM Forms (OSGI).
I have been reading here but, I cannot find any reference to OutputService.
I am using the Adobe Archetype for creating custom Servlets, workflow components, etc. I also have the the client sdk in my pom:
<artifactId>aemfd-client-sdk</artifactId>
<groupId>com.adobe.aemfd</groupId>
Is there a quick tutorial that will show me how to use the OutputService to take an XDP and generate a PDF?
Thanks,
Solved! Go to Solution.
Views
Replies
Total Likes
The output service is provided out of the box
you can write a simple post wrapper as Shown in the link I sent earlier
The output service is provided out of the box
you can write a simple post wrapper as Shown in the link I sent earlier
@crich2784 Nice to hear from you as well. I might have a post jsp for forms service as well. Please msg me your email and I will send you the jsp.
@Mayank_Gandhi which library do I need to include in my project for FormsService?
In crx /libs/xfaforms/install
By default XDP and input prefill data will be read as w3c dom document, you need to convert to AEMFD document using ByteArrayOutputStream, tranformfactory to inputstream and then return new com.adobe.aemfd.docmanager.Document(is)
public static Document createFlatPDF(String pathToXDP, com.adobe.aemfd.docmanager.Document xdp, com.adobe.aemfd.docmanager.Document data, OutputService outputService) { Document outDoc = null; outDoc = outputService.generatePDFOutput(xdp, data, getPDFOutputOptions(pathToXDP)); return outDoc; } public static PDFOutputOptions getPDFOutputOptions(String pathToXDP) { PDFOutputOptions options = new PDFOutputOptions(); options.setContentRoot(pathToXDP); options.setEmbedFonts(true); return options; }
Views
Likes
Replies