I am using create pdf smart service to generate a new pdf document.
I am confused what will be the possible input for the content field of Create PDf smart service.
I have tried two options
1- I have using regular string but than i get an error
[An error occured while trying to verify the Contents input: java.lang.String cannot be cast to [Ljava.lang.Object;]
2- I have used
'type!{urn:appian:ps:pdftools}PdfContent'( page: 1, xPercent: 10, yPercent: 10, angle: 0, sections: { { style: rule!PDF_convertToPDFstyle(),//return PDFStyle type data components: { { style: rule!PDF_convertToPDFstyle(), value: "Shivam" }, { style: rule!PDF_convertToPDFstyle(), value: "Gupta" } } } }) to get data of type PDFContents that has specified in reference document.
But than I am getting an error
[An error occured while trying to verify the Contents input: java.util.LinkedHashMap cannot be cast to [Ljava.lang.Object;]
Please provide any input on how this should be configured.
Discussion posts and replies are publicly visible
The expression below worked for me. Notice that PdfText doesn't have style.
PdfText
style
= { 'type!{urn:appian:ps:pdftools}PdfContent'( page: 1, xPercent: 10, yPercent: 10, angle: 0, sections: { 'type!{urn:appian:ps:pdftools}PdfSection'( style: null, components: { 'type!{urn:appian:ps:pdftools}PdfText'( value: "Some" ), 'type!{urn:appian:ps:pdftools}PdfText'( value: "text" ) } ) } )}
hey im getting the following error any idea?
Hi Shivam Gupta have you created Data Type for the pdf generate ?
I am facing the issue while generating pdf with this reference code. Please help in that.
Not sure whether you will get an answer in a 7 years old thread.
I suggest to start a new one.