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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Error while invoking renderPDFForm with attachment


Level 2


I'm using ES4 renderPDFForm service to render pdf along with attachment.

This service works if I dont have PDF attachment but doesn't work PDF with attachments.

I'm sending the PDF attachment like below.

     Map attachments = new Map();

     MapItem item = new MapItem();


     byte[] pdfAttachment = new byte[10,20,30...]

     com.adobe.idp.Document doc = new com.adobe.idp.Document(pdfAttachment );


     attachments .add(item);

service.renderPDFForm("CORR0040-MiscellaneousMS-8.xdp", inputData, renderSpec, spec, attachments);

Error I'm getting is: java.lang.ClassCastException: java.lang.String incompatible with com.adobe.idp.Document

Please help me how to resolve this...

0 Replies