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