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 / How do I create a PDF ...
Power Apps
Answered

How do I create a PDF on OneDrive of a Screen in Power Apps?

(0) ShareShare
ReportReport
Posted on by 932

The Goal

Create a PDF file in a folder on OneDrive.

 

The Attempts

The punch line here is that no data is being recorded in Power Automate.

 

I have

 - enabled "PDF function" in "Upcoming features", "Experimental" 

 - Created a Flow (if this can be done wholly in Power Fx, that is great, too)

    * The precise Flow seems unimportant right now, as I can't seem to pass any information to Flow

 - Added this code to my Power App, Canvas App

 

SavePDFToOneDrive.Run({PDFContent:PDF('Quick Look')})

 

From my Flow, in the Power Apps (v2) trigger, I don't get any data (Content-Length: "0",):

BenDonahue_0-1714411094095.png

The Result

No data is received in the Power Automate Flow

 

The Ask

How can I get a PDF of a screen in Power Apps saved to OneDrive

 

The Thanks

Thank you for your assistance with this. This has been a maddening experience, and I am very much looking forward to a successful conclusion to this, so, again, thank you!! You rock!!! 🤘

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @BenDonahue ,

     

    To get it out of the way: As you noticed the PDF function is an experimental feature which may break / be removed without prior notice and should hence not be used in production.

     

    Can you please confirm 'Quick look' is the name of either a Vertical Gallery, Vertical Layout Container, Horizontal Layout Container, Container, or Screen? These are the only supported objects: PDF function (experimental) - Power Platform | Microsoft Learn

     

    For testing, you could try saving the output of the function to a variable and see how that comes out?

  • BenDonahue Profile Picture
    932 on at

    Hello @BCBuizer,

     

    First, thank you for your time and help.

     

    Yes, "Quick Look" is a screen name. Once I save the PDF to a variable, I can see the PDF using the PDV viewer control, so I know that part is working. This issue, I believe, is handing that data over to Power Automate; I could be mistaken.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @BenDonahue ,

     

    If you can capture the file content in a variable, the PDF function should indeed not be the issue. Next step in testing is to try and pass the value of the variable to Power Automate. 

  • BenDonahue Profile Picture
    932 on at

    And there's the rub; choosing a File type to receive in Power Apps, nothing is being received ion the Run() call.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @BenDonahue ,

     

    I was about to write a formula to test when I noticed you are trying to pass a record to Power Automate and I think the issue is there. Can you please try with the below formula where the output of the PDF function is passed to Power Automate as a text?

     

    SavePDFToOneDrive.Run(PDF('Quick Look'))

     

  • BenDonahue Profile Picture
    932 on at

    @BCBuizer ,

    After switching up the data transfer from File type to Text type, I places a Compose right after the trigger to report on the data being transferred, and this is what I got:

    appres://blobmanager/4c36f93356c04f7e8431b42706c49db0/4

     This might be real promising; is this referencing a location where the PDF data in Text form can be found?

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @BenDonahue,

     

    Indeed it looks like that. 

     

    May I ask if you tried using this guide in the official documentation of the function to get things to work? Work with the PDF function (experimental) - Power Apps | Microsoft Learn

  • Verified answer
    BenDonahue Profile Picture
    932 on at

    The simple solution involves leveraging graph, like so:

     

     

    Set(_now, Text(Now(),"yyyy-mm-dd_hhmm-ss"));
    Navigate('Completion Tracker',ScreenTransition.Cover);
    Set(
     strPDFCompletionTrackerTTL,
     Concatenate(
     "CompletionTracker_",
     _now,
     ".pdf"
     )
    );
    Set(pdfCompletionTracker, PDF('Completion Tracker', {Orientation: "Landscape"}));
    
    Office365Groups.HttpRequest(
     $"https://graph.microsoft.us/v1.0/me/drive/root:/" & strPDFCompletionTrackerTTL & ":/content",
     "PUT",
     pdfCompletionTracker
    );

     

     

    A more abstracted version of the graph call is:

     

     

    Office365Groups.HttpRequest(
     $"https://graph.microsoft.us/v1.0/me/drive/root:/" & <PDFFileTitle> & ":/content",
     "PUT",
     <PDF Content>
    );​

     

    I imagine this will help a lot of folk; I certainly hope so.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard