Forum Discussion
Add image from SharePoint list To PDF using Power Apps
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:
Image in pop-up:
Image in PDF:
For the PDF icon, the OnSelect property is set to
For the "Create PDF" button, the OnSelect property is set to
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
I've also tried
<img src=data:image/png;base64," & Image1.Image &">
but that didn't work either