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

SOLVED

AEM Output Service REGARDING

adeivasigamani
Level 4
Level 4

Hi Folks,

The following link http://helpx.adobe.com/aem-forms/6/output-service.html gives info about generating PDF document in AEM, but I do not find the OutputService class in the jars that come along AEM 6 installation. 

Please let me know if any of you have tried creating PDF document in AEM without using a serviceclientfactory to connect to Adobe Livecycle ES4.

The Java API link given at http://helpx.adobe.com/aem-forms/6/javadocs/index.html, but not able to find a single example that uses these API to generate a PDF. 

Regards -

Ashok Deivasigamani

1 Accepted Solution
nitinn18425437
Correct answer by
Level 2
Level 2

Hi Ashok,

     Sample code for using Output Service in AEM for generating PDF is on following page

     http://helpx.adobe.com/aem-forms/6/aem-document-services-programmatically.html

 

    Output Service API classes/interface can be found in Client SDK jar at this maven repository. http://repo.adobe.com/nexus/content/groups/public/com/adobe/aemfd/aemfd-client-sdk/1.0.2/

 

 Thanks

Nitin

View solution in original post

5 Replies
nitinn18425437
Correct answer by
Level 2
Level 2

Hi Ashok,

     Sample code for using Output Service in AEM for generating PDF is on following page

     http://helpx.adobe.com/aem-forms/6/aem-document-services-programmatically.html

 

    Output Service API classes/interface can be found in Client SDK jar at this maven repository. http://repo.adobe.com/nexus/content/groups/public/com/adobe/aemfd/aemfd-client-sdk/1.0.2/

 

 Thanks

Nitin

View solution in original post

adeivasigamani
Level 4
Level 4

Hi Folks,

The adobe helpx at http://helpx.adobe.com/aem-forms/6/overview-aem-document-services.html identifies four services available in the Output services namely generatePDFOuput2, generatePrintedOutput2, sendToPrinter, transformPDF. But the OutputService java doc available at http://helpx.adobe.com/aem-forms/6/javadocs/com/adobe/fd/output/api/OutputService.html does not have the above services but instead have 6 other methods, 2 for generating PDF, 2 for generating Printed Output(Post Script, etc) and 2 for generating (1 for pdf and 1 for printed) documents in batch.

I had used generatePrintedOutput(Document inDoc, Document data, PrintedOutputOptions printedOutputOptions)  and generated the post script, I had attached the code for your reference. 

I have not understood the use for

setXci(Document xci) in the PrintedOutputOptions API, Also how to send the generated Post Script to a local or networked printer, is there a API to set the printer parameters.

 

Regards -

Ashok Deivasigamani

adeivasigamani
Level 4
Level 4

Hi Nitin,

Thanks for the guidance, Now after building the code and deploying the same in AEM, I am facing the following issue.

I had placed by XDP file in the the following path in dam /content/dam/formsanddocuments/NedbankInc/ and set the same as content root for the PDF options object before calling the generatePDFOutput method.

But I get the following exception

Caused by: java.io.FileNotFoundException: \content\dam\formsanddocuments\NedbankInc\CurrentAccountForm.xdp (The system cannot find the path specified)

Regards -

Ashok Deivasigamani

smacdonald2008
Level 10
Level 10

This one the list for an end to end community AEM article. 

adeivasigamani
Level 4
Level 4

@snacdonald2008, I did not get your last post on the thread.

Regards -

Ashok Deivasigamani