AEMaaCS forms Output Services generatePDFOutput throws exception AEM_OUT_001_003 | Community
Skip to main content
New Participant
March 28, 2025

AEMaaCS forms Output Services generatePDFOutput throws exception AEM_OUT_001_003

  • March 28, 2025
  • 3 replies
  • 2160 views

Tried to generate a PDF with the input of xml and .xdp template. Getting this exception 
com.adobe.fd.output.commons.exception.OutputServiceException: AEM_OUT_001_003:Unexpected Exception: AEM_OUT_001_003:Unexpected Exception: Error resolving template

we are using the below xml and xdp template

<?xml version="1.0" encoding="UTF-8"?>
<data>
<fName>First Name</fName>
<lName>Last Name</lName>
</data>

Note: we followed the process as per this docx. Generate PDF documents using output service | Adobe Experience Manager

Thanks in advance.

3 replies

Employee
April 17, 2025

If your bundles are not in active state your install has not succeeded 

ppease make sure all bundles are active 

Khushwant_Singh
Employee
April 21, 2025

@aravinds , I just wanted to check in—has the issue been resolved, or are you still in the process of gathering information?

aravindSAuthor
New Participant
April 21, 2025

Hi @khushwant_singh ,

I'm checking on this, if works i will update

Employee
April 17, 2025

@aravinds  the issue is it is not able to find the template. Can you please make changes to your code as per below code sample?

 

String templateName = "sampleTemplateUpdated.xdp"; PDFOutputOptions pdfOutputOptions = new PDFOutputOptions(); // set content root of tempalte pdfOutputOptions.setContentRoot("/content/dam/formsanddocuments"); // set other options in PDFOutputOptions // involve Output Service Document resultantDocument = outputService.generatePDFOutput(templateName,submittedData, pdfOutputOptions);

 

OutputService java docs for Cloud are at https://javadoc.io/doc/com.adobe.aem/aem-forms-sdk-api/latest/com/adobe/fd/output/api/OutputService.html and PDFOutputOptions can be found at https://javadoc.io/doc/com.adobe.aem/aem-forms-sdk-api/latest/com/adobe/fd/output/api/PDFOutputOptions.html.

 

Thanks,

Darshan

aravindSAuthor
New Participant
April 17, 2025

Hi @darshanma ,

Thanks for your reply, i tried the above code as well, didn't worked as expected.

Employee
March 30, 2025

Hi @aravinds,

The XML that you are using is wrong as it is not able to recognize the template. I have updated the input XML and now I am able to see the prefil information.

Sample XML:

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2022-06-21T07:32:11Z" uuid="55226f44-34ad-4572-9ad5-23834f260aa5">
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data>
<form1>
<fname>FirstName</fname>
<lname>LastName</lname>
</form1>
</xfa:data>
</xfa:datasets>
</xdp:xdp>

Thanks
Pranay

aravindSAuthor
New Participant
April 1, 2025

Hi @pranay_m ,

Thanks for your reply, I have tried the same xml format which you shared still i got the same exception. This is the code which i'm using. Here I have added the sample xdp also.

Let me if i need to modify/change anything.

Thanks.

Employee
April 1, 2025

Hi @aravinds,

Thank you so much for your response. Based on the description, I have made some changes to the Sample.XML. Please find below the updated XML and try out the options.

 

<?xml version="1.0" encoding="UTF-8"?>
<form1>
<fName>FirstName</fName>
<lName>LastName</lName>
</form1>

 

Also, I tried to run the same sample XDP and the XML using the OOTB example and I am successfully able to generate the output document.

 

Thanks

Pranay