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 Automate / Creating PDF version o...
Power Automate
Answered

Creating PDF version of a form

(0) ShareShare
ReportReport
Posted on by 29
Hi 

I have created a form in power apps which is connected to a site, so that when the form is filled by a user, it collects and stores the data on the site. 

Now I want to create a PDF version of that item created by a user how can I do it ? I can't use third party connectors like encodian, plumsail etc. and I cannot use Onedrive for Business because I'll be using the power automate flows from a Service Account. 

How can I do it ?  
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,073 Super User 2026 Season 1 on at
     
    There is a PDF function in Power Apps which generates a PDF document from the contents of a screen or certain types of controls.
     
    In order to use this functionality in power-apps, you must turn on the PDF function in Settings -> Upcoming features -> Experimental. As an experimental feature, it's disabled by default.
     
    Sample Implementation
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
  • KV-03091035-0 Profile Picture
    29 on at
    Hi @MS.Ragavendar 

    Thank you for your help however my form has collapsible sections as well (which work on the visibility of the containers) 

    Adding a snip for your reference - will your solution still work ? 
  • MS.Ragavendar Profile Picture
    7,073 Super User 2026 Season 1 on at
     
    There is Property called ExpandContainers passing the values to this parameter ensure the container expands to show any hidden or off-screen controls.

    {ExpandContainers: true}
     
     
  • Louisa# Profile Picture
    36 on at

    If the PDF is only intended for internal reasons and is not to be displayed directly to the user, you can also proceed as follows.

    Flow:

    1.) Create an Excel file where you store the data from the form.

    2.) Convert the Excel file to PDF.

    3.) Delete the Excel file.

  • KV-03091035-0 Profile Picture
    29 on at
    Hi @MS.Ragavendar

    Understand the ExpandContainers filter, however that works on single section only. If within One container I have 3 containers each representing a collapsible section, then how do I code it ? Please see the sections in snips 






  • Power Platform 1919 Profile Picture
    2,207 Super User 2026 Season 1 on at
    HI ,
    can you share the Power fx code written when testing the pdf function and if possible can you share the tree view of the form .
    ideally you can do PDF(Main_Container_Name,{ExpandContainers: true})
    here main container or screen is the place where the form is present. if the form occupied the entire screen , then you can try PDF(Screen_name,{ExpandContainers: true})
  • Verified answer
    MS.Ragavendar Profile Picture
    7,073 Super User 2026 Season 1 on at
     
    The ExpandContainers:true Property will expand the container inside the screen and pass to the PDF. 
     
    However if you have written the functionality such as using the context variables for the expand and collapse of the datacard (as shown below)
     
    expandcont2 is true then only i am rendering the Created and Created By - If you have written the logic like this ExpandContainers:true  will not be helpful because we are using conditional logic.
     
     
    How this can be achieved is before taking the PDF i am expanding all the containers and passing that to PDF function.
     
     
    In this way, the output will be like this.
     
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     
  • KV-03091035-0 Profile Picture
    29 on at
    Hi  

    Attaching my tree view. Container 7 has everything. Then each child container represents each section which has form 1, 2 , 3 and all of them are connected to the same sharepoint list just representing different questions.  

  • KV-03091035-0 Profile Picture
    29 on at
    Hi 

    Problem is my screen size is A4 and the collapsible sections cannot be opened all in one go as they are fit in such manner, any other solution ?  
  • MS.Ragavendar Profile Picture
    7,073 Super User 2026 Season 1 on at
     
    You have used normal container and vertical container 
     
    This function is still experimental. To render the whole data in the page add time for 3-4 seconds and after that start the PDF function and generate a report over multiple pages.
     
     {ExpandContainers:true, Size: "A4", Margin: "0,0,0,0", Orientation: "Portrait"}

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 Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 671

#3
Haque Profile Picture

Haque 551

Last 30 days Overall leaderboard