PDF Tools - Create PDF Smart Service

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

Parents Reply
  • 0
    Certified Senior Developer
    in reply to sushmas3049

    Try this

    {
      'type!{urn:appian:ps:pdftools}PdfContent'(
        page: 1,
        xPercent: 50,
        yPercent: 50,
        angle: 0,
        sections: {
          'type!{urn:appian:ps:pdftools}PdfSection'(
            style: 'type!{urn:appian:ps:pdftools}PdfStyle'(
              font:"Aerial",
              fontSize: 14,
              color:'type!{urn:appian:ps:pdftools}PdfColor'(
                r:13,
                g:26,
                b:129
              )
            ),
            components: 'type!{urn:appian:ps:pdftools}PdfText'(
              style:  'type!{urn:appian:ps:pdftools}PdfStyle'(
                font:"Aerial",
                fontSize: 10,
                color:'type!{urn:appian:ps:pdftools}PdfColor'(
                  r:23,
                  g:219,
                  b:36
                )
              ),
              value: "Hi there! How are you?"
            )
          )
        }
      )
    }

Children
No Data