
Hi Community
Looking for some help with following: I'm building an app which ultimately will generate a report in PDF.
User fills in some data, and takes in each step some pictures. (4 pictures and one pen input in total.)
How do I get these images on the pdf?
I tried multiple ways, but none are working. Also there is a 2MB limit in the OneDrive conversion of HTML to PDF.
So I switched from "Add Picture" to the Camera input -> this generates low resolution images, but hopefully just small enough to tackle the 2MB limit.
I tried storing every image in variable (Set Pic1, Camera1.Stream) -> this gives me the base64 encoding. So I sent this Pic1 to PowerAutomate and store it in a variable there (varPic1), I should be able to just use this in my HTML code, right?
<img src='varPic1'>
Also I do a compose action with my html in it. It comes out with '\n' everywhere...
Any help is appreciated! If I was not clear enough please let me know!
Thanks in advance
Hi @BClouded ,
Try
set(varpic1,JSON(camera1.Stream,ignorebinarydata))
In your html put
"<img src=&varPic1&">"
You can also make a collection. on your photo button you can add onselect
You can then concat in the html using Concat(photocollectionforhtml,"<IMG src="&Value&"width='50' height='50'>")
The 2mb limit is very restricting though as you can only take three photos. I've messed around with various aspects and haven't found a workaround other then uploading all the photos and pdf document to a list item.
PowerApps doesn't like to display the data but it works when you pass it it flow or include in an email body