web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

PDF not load photo

(0) ShareShare
ReportReport
Posted on by 25

Hello,
Uploads pictures to the sharepoint list as attachments. Everything saves correctly. Then I display all items from sharepoint list and all photos from attachments (as Gallery). Everything works on the screen. Then I create a PDF (using the PDF() function), and immediately upload it as an email attachment. My problem is that if I have pictures up to about 0.5MB they load correctly into PDF, if I have pictures bigger they don't load into PDF and PDF have errors. PDF file has 2 pages of content and then 100 empty. It should only have 2 pages.

Images are uploaded using a form (UploadedImage, AddMediaWithImage, attachCtrl)

 

Sharepoint list attachment collection code:

Collect(colAttachments;{DisplayName:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; ID:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; Id:"("&zm_ostatni_audyt&")"&GUID()&".jpg"; Value:UploadedImage3_1.Image});;
Reset(attachCtrl1_1)

 

Code to generate PDF and send email:

Office365Outlook.SendEmailV2(User().Email;"PDF"; "Body email";{Attachments:Table({Name:var_tmp &"_nr_"&number&".pdf";ContentBytes:PDF(Gallery4_1;{Size:A4;ExpandContainers:true})});

 

How to generate a PDF so that large photos load properly Or how to reduce the size of the photo before uploading to shapepoint list

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @blazejgorecki ,

    I assume you are using HTML to create the PDF in Power Automate ? There is a "hard limit" of 2mb total size for any images here - no workaround as far as I know.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • blazejgorecki Profile Picture
    25 on at

    I am not using Power Automate to generate the PDF. I am using functions from PowerApps. Shouldn't the PDF generation be finished before the email send function is called. But I don't know how to make the variable containing the PDF an attachment to Emial.

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @blazejgorecki ,

    This blog of mine may be useful to you.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • blazejgorecki Profile Picture
    25 on at

    Nice tutorial. However, in my case it doesn't solve the problem. This is definitely a problem with the generation of the PDF file by the PDF() function. By pdfviewer control I display generated variable with pdf file. Still my photos are not loading properly.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @blazejgorecki ,

    Yes, it is a new function, so that may be the case

  • Community Power Platform Member Profile Picture
    on at

    Searching for the solution for same issue.

  • TMAC27 Profile Picture
    8 on at

    It's been awhile but I tried your solution. (No Flow). If I have the company logo a 25KB PNG on the screen of my Canvas App it does not show in the pdf and I get an error: Insufficient data for an image. I remove the logo from it and the PDF is generated as expected. I am beginning to think that there is a bug in the experimental add-on. Unless you can suggest something else. If you want, I can post it as an original question. Thanks

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @TMAC27 ,

    Yes it could be a bug and I have found issues with the proper display of images as well.

  • aseel Profile Picture
    4 on at

    Still struggling with the PDF Viewer and image attachments:
    I upload pictures to a SharePoint list as attachments.

    ✅ I’ve verified that everything is saved correctly.

    ✅ I also load the attachments into a collection to ensure there’s no issue with the image data.

    ✅ The images are displayed in a Gallery without any problem.

    ✅ Then I generate a PDF using the PDF() function and immediately send it as an email attachment.

     

     The issue:

    Some images randomly don’t appear in the generated PDF.

    It’s inconsistent — the same image might appear in one PDF but be missing in another.

    It doesn’t seem related to image size either — even larger images load fine.

     

    Has anyone encountered this issue or found a workaround to ensure all images consistently render in the PDF?

     

    Thanks in advance!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard