Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

PowerApps Gallery Export to PDF using Power Automate- PDF format narrows with each page

(0) ShareShare
ReportReport
Posted on by 8

I have a fully functioning flow with a PowerApps trigger that will export all items in a gallery to a PDF, and email the PDF to the user. The issue: the PDF is 10+ pages, and with each page, the margins narrow. The first page has standard wide margins and with each page the margins decrease to a few words of text. I have done other exports that do not have this formatting. 

 

My flow

mjanuzzi_0-1646170092094.png

The HTML text box in the app: (this is the same input in the compose action of the flow)

The HTML is meant to display each question and answer in the list.

"<center><html><body><div><h1><b>PDF Title
" &
"<b> Frequently Asked Questions (FAQ)</center></h1><hr>" & Now()&
Concat(
Gallery1.AllItems, "<b><h4> Question : " & Title & "</b>
<p>" & Answer &"</b><html><body><div>")

 

The PDF format Pages (decreasing margins)

mjanuzzi_1-1646170289045.png
mjanuzzi_2-1646170303519.png

mjanuzzi_3-1646170407328.png

 

 

  • mjanuzzi Profile Picture
    8 on at
    Re: PowerApps Gallery Export to PDF using Power Automate- PDF format narrows with each page

    This works! Thank you for taking the time to provide a solution! The only adjustment I have to make is to end the bold text before the question starts, but this solved the format issue. Thank you!

  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: PowerApps Gallery Export to PDF using Power Automate- PDF format narrows with each page

    Hi @mjanuzzi :

    I think the problem is caused by the continuous nesting of multiple <div>,please try:

    "<center>
    <html>
    <body>
     <div>
     <h1><b>PDF Title" &"<b> FAQ)</center></h1><hr>" &
    Now() &
     Concat(
     Gallery1.AllItems, 
     "<b><h4> Question : " & Title & "</h4><p>" & Answer &"</p></b></div>")
    &"</body></html>"

    Best Regards,

    Bof

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow