cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elly-Farokhi
Regular Visitor

Add inspection images to report

Hello, 

 

I created the inspection application that collect images based for each section and I need to add this images to the PDF report file. 

I tried many ways and I couldn't bring the images to PDF, can you help me with that please? 

 

My technique is I collect data from power app in Sharepoint library and here is some screenshot from what I have so far.

 

Step 1 :collect image in the power app: 

photos.PNG

 Step 2: create HTML in power app

html.PNG

 

 

Here is the flow making the HTML

flow_part_1.PNG

 

Here is where I am adding the image: 

 

flow_part_2.PNG

 

Here is the format I like to have the images in PDF file. 

pdf.PNG

 

Many Thanks for your help in advance 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Elly-Farokhi :
Q1: Because I cannot see the:outputs('Get_file_content')?['body']['$content-type']

A:It will not appear in the dynamic content tag, you have to enter it manually in expression tag:

vbofengmsft_0-1627952922715.png

Q2:Then the part you create the file I am composing the HTML file where I like to add the correct image per report in this part: 

A:You could just insert it where you want to insert

<img src=data:@{outputs('Get_file_content')?['body']['$content-type']};base64,@{outputs('Get_file_content')?['body']['$content']}>

Best Regards,

Bof

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @Elly-Farokhi :

File content cannot be directly referenced in HTML code (because it is an object type value).

I suggest you get the base 64 format file first, and then use <img> tag to achieve your needs. I've made a test for your reference:

vbofengmsft_0-1627896128813.png

The image tag should be some thing like this:

 

<img src=data:@{outputs('Get_file_content')?['body']['$content-type']};base64,@{outputs('Get_file_content')?['body']['$content']}>

 

I think this link will help you a lot:

How to Display Base64 Images in HTML 

Best Regards,

Bof

 

Hello Bof, 

 

Thank you for the quick response, 

 

can you show me the part you get file content. I am calling the images from sharepoint library.

because I cannot see the:@{outputs('Get_file_content')?['body']['$content-type']};

EllyFarokhi_0-1627902271981.png

Then the part you create the file I am composing the HTML file where I like to add the correct image per report in this part: 

<td style='width: 213.641px; height: 198px; background-color: white; border-style: solid; border-color: white;'>
PHOTO2</td>

 

Then I have create file from the output of my previous step and I convert file and save it.

EllyFarokhi_1-1627902600322.png

 

My other challenge is I need to show only the images that captured in on visit all together. 

 

 

Hi @Elly-Farokhi :
Q1: Because I cannot see the:outputs('Get_file_content')?['body']['$content-type']

A:It will not appear in the dynamic content tag, you have to enter it manually in expression tag:

vbofengmsft_0-1627952922715.png

Q2:Then the part you create the file I am composing the HTML file where I like to add the correct image per report in this part: 

A:You could just insert it where you want to insert

<img src=data:@{outputs('Get_file_content')?['body']['$content-type']};base64,@{outputs('Get_file_content')?['body']['$content']}>

Best Regards,

Bof

View solution in original post

Elly-Farokhi
Regular Visitor

Thank you for the help Bof 🙂

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,158)