Add image from SharePoint list To PDF using Power Apps

Copper Contributor

I have a Power App that is integrated with a SharePoint list and having trouble trying to get the image in the item to show in the pop-up and the PDF.

 

The app is set up so that when someone clicks on an item and then clicks on the PDF Icon, a pop-up will appear with a "Create PDF" button to create a PDF in their OneDrive documents folder of that item.

 

The list has an Image column to upload an image to that item:
0_LIst_ImageColumn.png

 

 

Image in pop-up:

3_PDFPopUp_Image.png

 

 

Image in PDF:

4_PDF_Image.png

 

For the PDF icon, the OnSelect property is set to

PDFIcon_OnSelect.png

 

For the "Create PDF" button, the OnSelect property is set to

1_CreatePDFButton_OnSelect.png

I've also tried the code below but get an unexpected character error for the : after Base64String

Set(

    varJsonAttachment,

    Base64String:JSON(

        (Image1.Image),

        JSONFormat.IncludeBinaryData

    )

);

PDFGenerator.Run(HtmlText1.HtmlText);

UpdateContext({varShowHTML: !varShowHTML})

 

 

For the HTML text to pass into the PDF, the data HTMLText property is set to

2_HTMLText_Image.png

I've also tried

<img src=data&colon;image/png;base64," & Image1.Image &">

 

but that didn't work either

0 Replies