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

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,847 Super User 2025 Season 2 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

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