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 Platform Community / Forums / Power Apps / The size of the PDF I ...
Power Apps
Suggested Answer

The size of the PDF I created in Power Apps is too large

(0) ShareShare
ReportReport
Posted on by 3

Hello everyone, I hope you are well.

 

I've been working with the Power Apps PDF creator. I need to create a 3 pages document and send it by email, however when I send it the size is 14 MB, someting really large and not practical. My question is: Is there a way to limit the size of a created PDF?

 

PD: This is the short code I am using:

 

Set( ActaEntrega; PDF ( Acta; { ExpandContainers: true})

Categories:
I have the same question (0)
  • gjchrist Profile Picture
    6 on at

    I have the same problem with images. The file size is humongous (a 94kb .png image turns into a 22mb .pdf file).

    This can't be the intended result.

     

    I did figure out that by removing the "height=" and "width=" parameters in .svg images and just using "viewbox=" did make the files manageble, however this does not fix .jpg or .png images included by the pen input.

     

    If anyone has fixed this please share. PDF() is a real game changer, however an unmangeble file size kills this feature.

  • baube1 Profile Picture
    2 on at

    I have also been struggeling with the bug regarding PDF file sizes when including PNG or JPG images. I've found a workaround that might help:

    It appears there's still a bug with the PDF() form when it contains PNG or JPG images, causing unnecessarily large file sizes. A workaround is to convert your image to base64 and include it in an image controller. For example:

    "data:image;application/octet-stream;base64,iVBORw0KGgoAAAANSUhEUgAAAG...."
     

    By doing this, the image will display in your PDF without significantly increasing the file size. I recommend making the image as small as possible before converting it to minimize the base64 string length. This offcorse works best with static images like logos that appear at the top of your document, where you have the possibility to convert it to base64 manually without introducing a Power Automate to do it.

    This solution is most effective for static images, but it might help with your problem of a 94kb PNG turning into a 22mb PDF file.

  • Suggested answer
    MichalW_84 Profile Picture
    2 on at
    hi,
     
    I just managed to solve it - and it worked magic for me. 
     
    from 14 MB pdf I went down to 2MB. 
     
    I resized image to quite a small size (company logo for paperwork doesn't have to be big) and ran through website to convert it to base64 code Base64 Image Encoder
     
    then in onVisible I set variable Set(image64,"code from the website of the image"), inserted image control and in image property I put image64 - boom, done. 

    you need to refresh screen for the code to work. sent to my email and 2MB. I'm more than happy with this. I will test if I can reduce it even more. 

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard