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.
Views
Replies
Total Likes
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
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.
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
The link provided by pranay will only work for AEM Forms 6.5 and will not work for AEM Forms CS
Views
Replies
Total Likes
Thanks for your reply @workflowuser , do you have any reference to run for AEMaaCS.
Views
Replies
Total Likes
Views
Replies
Total Likes
@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.... and PDFOutputOptions can be found at https://javadoc.io/doc/com.adobe.aem/aem-forms-sdk-api/latest/com/adobe/fd/output/api/PDFOutputOptio....
Thanks,
Darshan
Views
Replies
Total Likes
Hi @DarshanMahor ,
Thanks for your reply, i tried the above code as well, didn't worked as expected.
Views
Replies
Total Likes
If your bundles are not in active state your install has not succeeded
ppease make sure all bundles are active
Views
Replies
Total Likes
@aravindS , I just wanted to check in—has the issue been resolved, or are you still in the process of gathering information?
Views
Replies
Total Likes
Hi @Khushwant_Singh ,
I'm checking on this, if works i will update
Views
Replies
Total Likes
Please let us know, @aravindS. Thanks!
Views
Replies
Total Likes
@aravindS any update on the issue. Please let us know if you find any solution for this issue.
Views
Replies
Total Likes
We are also facing the same issue. I have gone through the above steps, but still issues exists
Views
Replies
Total Likes
Hi @SattibabuNa .
Follow this thread. You can use that api.
Views
Replies
Total Likes
Views
Likes
Replies