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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PDF() function gallery...
Power Apps
Suggested Answer

PDF() function gallery is perfect in studio but distorted in app

(2) ShareShare
ReportReport
Posted on by 4
I've designed a custom gallery that exports perfectly to PDF, with pagination, when I'm in studio mode. In the published app, the template height expands dramatically, and the images and text overlap and are crowded.
 
If I Lock Aspect Ratio for the entire app, the PDF retains the right format even in the published app. However, the LAR causes problems throughout the rest of the app, including blurring PDFs we view in the app.
 
Does anyone have a solution yet for retaining the proper gallery format for PDFs that:
- are based on galleries
- can have multiple pages
- are in a canvas app that's designed to an unlocked aspect ratio
 
The gallery is in a container with expand set to true, which all works great in Studio.
 
I have tried:
- Portrait Print and Landscape: I can't get a basic gallery to be full screen to even test this
- Sending the PDF blob to Power Automate to convert to PDF (using JSON and content approach)
- Attaching as an email to Outlook
- Setting all images to Fit and maxing the text size with HTMLText controls. This limits the text and image height, but the Template Height still distorts to a massive size in the published app's PDF
 
Thank you for any workaround.
Categories:
  • Nandit Profile Picture
    1,568 Moderator on at
     
    It would be great if you could share a few screenshots.
     
    Kind regards, 
    Nandit
  • Nandit Profile Picture
    1,568 Moderator on at
    Hi,

    Following up to check if you were able to solve this issue?

    Kind regards,
    Nandit
  • Suggested answer
    DA-31101358-0 Profile Picture
    2 on at
    Here's how I resolved this: I created a helper app with Locked Aspect Ratio to serve as the PDF creator. When users select the link in the original app to Save as PDF, it sends a deep link with the selected gallery items to the second app, where it formats and saves to PDF correctly. The original app is back to normal appearance and functionality.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard