Introduction:
With this new feature of PDF Function in Power Apps, this has become
much simpler.
Please follow the below steps for getting the PDF function
in PowerApps:
Step 1: Go to File -> Settings
Step 2: Go to Upcoming Feature and search for PDF and enable
the PDF Function toggle.
Once we have enabled the function, you will be able to use this function in your App.
Please see the below example for generating PDF from
Power Apps:
Step 1: Create a Power Automate Flow with trigger Power Apps (V2) and Add an input as File.
Step 2: Add action to Create file in OneDrive for Business and add the output of the trigger to File Content
Hence, the overall flow will look like this:
Step 3: Go to Power Apps and add this flow on an Action
Button.
Step 4: Write the below code on “OnSelect” property of the
button.
GeneratePDF.Run(
{
file: {
name: "test.pdf",
contentBytes: PDF(Screen1)
}
}
)
Step 5: Click on the button and it should trigger the Flow.
We should have PDF File generated in the OneDrive when Flow is executed successfully.
NOTE: If you are targeting to convert a gallery control to PDF, then the time it takes to convert varies upon the number of rows in the gallery.
What a blog
ReplyDelete