PDF Tool - Covert image to PDF- the image size is not resized and right part is chopped off

A Score Level 1

 {

{
  'type!{urn:appian:ps:pdftools}PdfContent'(
    page: 1,
    xPercent: 10,
    yPercent: 95,
    angle: 0,
    sections: {
      'type!{urn:appian:ps:pdftools}PdfSection'(
        components: 'type!{urn:appian:ps:pdftools}PdfImage'(
          scale: .2,
          document: todocument(ri!imageCreated)
        )
      ),
    }
  ),
  'type!{urn:appian:ps:pdftools}PdfContent'(
    page: 1,
    xPercent: 50,
    yPercent: 10,
    angle: 0,
    sections: {
      'type!{urn:appian:ps:pdftools}PdfSection'(
        style: 'type!{urn:appian:ps:pdftools}PdfStyle'(
          fontSize: 9
        ),
        components: {
          'type!{urn:appian:ps:pdftools}PdfText'(
            value: concat(
              ri!Nm,
              ", FEI#",
              ri!Id,
            )
          ),
        }
      ),
      'type!{urn:appian:ps:pdftools}PdfSection'(
        style: null,
        components: {
          'type!{urn:appian:ps:pdftools}PdfText'(
            value: concat(
              a!forEach(
                items: index(ri!Dates,"date",null),
                expression: if(
                  fv!isLast,
                  fv!item,
                  fv!item & ", "
                )
              ),
              " ",
              ri!teamInitials,
            )
          ),
        }
      ),
      'type!{urn:appian:ps:pdftools}PdfSection'(
        style: null,
        components: {
          'type!{urn:appian:ps:pdftools}PdfText'(
            value: concat(
              if(
                a!isNullOrEmpty(ri!Number),
                {},
                { "Exhibit ", ri!Number, " - " }
              ),
              "Page ",
              ri!imageCounts,
              " of ",
              ri!pageCount
            )
          ),
        }
      ),
    }
  ),
}

  Discussion posts and replies are publicly visible

Parents Reply Children
  • i'm not really sure what example you want.  i'd recommend you try various troubleshooting tips to see what the behavior of the resulting PDF is, including:

    • try it on images of different original resolutions (ranging between slightly smaller and much smaller)
    • adjusting parameters of the "pdf content" - notably the "scale" of the "pdf image", to see what it does when its value is changed
    • adjusting the number of "PDF Sections" and their respective settings, to see if that has any impact on the image you're trying to embed.