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 / The PDF function no lo...
Power Apps
Suggested Answer

The PDF function no longer seems to work

(0) ShareShare
ReportReport
Posted on by 27
Hello,

Since yesterday, the PDF function doesn't seem to “create” content, which causes my application to crash when I want to send the file in an e-mail or use it in power automate as indicated by the learn (Utiliser la fonction PDF (expérimentale) - Power Apps | Microsoft Learn).

Is there a one-off problem with this function?

Thank you for your answers.
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,866 Moderator on at
    Show the code that you using to execute the PDF. 
  • Florent Profile Picture
    27 on at
    Hello,
     
    I) Here is the code I use :
     
    Office365Outlook.SendEmailV2(
        "myemail@mycompany.com";
        "Dossier de révision";
        "Dossier de révision en PJ.";
        {
            Cc: CurrentUser.Email;
            Attachments: Table(
                 {
                     Name: Year(Today()) & "." & Month(Today()) & "." & Day(Today()) & " - " & Dos_Rev_No_Dossier_En_Cours.Text & " - " & "Dossier De Révision.pdf";
                     ContentBytes: PDF(Dossier_Revision_Social)
                 }
             )
        }
    )
     
     
    OnSelect Button :  Set(pdfBlob; PDF(Dossier_Revision_Social))
    Attachment control : {Name:"Dossier de Révision.pdf"; Value: pdfBlob}
     
    But the PDF document is empty :
     
     
    Have a nice day and thank you for your answers.
  • Suggested answer
    Florent Profile Picture
    27 on at
    Hello,

    After many tests, it seems that the problem comes from the fact that I had several containers superimposed on the same screen or, more likely, containers within containers.

    Although this isn't a solution in itself, but here's the workaround I've implemented:
    - Instead of using a container, I used a DataCard copied/pasted from a screen template with scrolling,
    - I added all my containers one after the other to the DataCard,
    - I applied the PDF function to the DataCard: “contentBytes: PDF(myDataCard; {ExpandContainers: true})”.

    Have a nice day!
  • msoenmez Profile Picture
    46 on at
    Have you made any changes since the PDF generation worked correctly in the page Dossier_Revision_Social? PDF function is experimental -and as I have also seen this before- if you have lots of components in the page, it may stop working. I think it is not optimized well and it uses all the memory available for the Browser Tab and that causes the crash. So I would suggest to check the UI elements in the page and try to reduce the count elements if you can. There are also other ways to generate PDF like generating an HTML and sending it to Power Automate, you can try to google it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard