Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

PDF Function generating weird pdf size

(0) ShareShare
ReportReport
Posted on by 227

Hi I am using the experimental PDF function. I have used a timer and the timer has the formula in the ontimerstart property. The whole thing was working correctly until now. The pdf get's generated but all of the controls are enlarged and are missing the rest of the controls towards the bottom of the page. Any ideas why this randomly start happening? 

 

NPatel12498_0-1707162756777.png

 

Formula in the timer ontimerstart property:

 

Set(
 VarPDF,
 PDF(
 Container4, 
 {
 ExpandContainers: true,
 Orientation: PaperOrientation.Portrait
 //Size: PaperSize.A4
 }
 )
);
Set(
 varFileName,
 Concatenate(Text(varRecord.ID),
 ".pdf")
);
create_mealschecklistpdf.Run(
 {
 file: {
 name: varFileName,
 contentBytes: VarPDF
 }
 }
);

 

 

  • NP-18101421-0 Profile Picture
    227 on at
    Re: PDF Function generating weird pdf size

    Hi,

     

    Even after I added a DPI it is still not working 😞 

    It used to work all this time. It is still working for my co worker with the same exact code as well. But mine seems to have broke.

     

     

  • sgtsnacks64 Profile Picture
    322 Super User 2024 Season 1 on at
    Re: PDF Function generating weird pdf size

    Hi @NPatel12498 ,

     

    You might want to try adding the DPI property to the PDF function and increase this to make the elements smaller on page. Remember this is an experimental feature so changes may occur that could break things!

     

    Default is 96, maybe increase to 128 and see what happens

     

    Also noticed the paper size is commented out, but unsure if this is intended or not 🙂

    Content on Microsoft Learn 

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,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard