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 / Create a multipage PDF...
Power Apps
Unanswered

Create a multipage PDF file using the PDF() function

(2) ShareShare
ReportReport
Posted on by 578

I have a gallery containing a single element, an HTMLText, that I want to use to generate a PDF file. To do this, I'm using the following code:

PDF(
 Gallery, {
 Orientation: PaperOrientation.Portrait,
 Size: PaperSize.A4,
 DPI: 96,
 ExpandContainers: true

 }
)

The problem I'm experiencing is that the gallery can have multiple rows and may extend beyond a single page, sometimes up to 30 pages. However, regardless of the number of pages, the generated PDF file only includes what I believe is the height of the gallery (in my case, 640), which fits within the screen height. If I increase the height of the gallery, for example to 2000, it displays more rows.

Ideally, I would like to keep the template size as an A4 page size, so each row would be on its own page. I tried changing the Template Size to PaperSize.A4, but that didn't work. While having one row per page would be great, the most important issue is to include all of the gallery rows in the PDF.

Any recommendations would be appreciated. Thank you in advance.

Categories:
I have the same question (0)

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard