Monday, 17 February 2025

How to print the current canvas app edit form details as PDF from a button click?

Introduction

Printing details from a canvas app edit form as a PDF can be incredibly useful for record-keeping, sharing, and documentation purposes. In this blog post, we'll walk you through the steps to achieve this using Power Apps' experimental PDF function.

Step 1: Enable the PDF Function

Before you can use the PDF function, you need to enable it in Power Apps Studio.

  1. Open Power Apps Studio: Sign in to Power Apps and open your canvas app.
  2. Go to Settings: On the command bar, select Settings.
  3. Enable Experimental Features: Navigate to Upcoming features > Experimental and turn on the PDF function.


Step 2: Add a Button to Generate PDF

Next, you'll add a button to your canvas app that will trigger the PDF generation.

  1. Add a Button: Insert a button onto your canvas app screen.
  2. Set OnSelect Property: In the button's OnSelect property, use the PDF function to generate a PDF of the current screen or form. For example:
    PDF(EditFormScreen)
    
    Replace EditFormScreen with the name of your screen or form.


Step 3: Save and Publish the App

After setting up the button, save and publish your app to make the changes live.

  1. Save: Save your changes.
  2. Publish: Publish the app to make the changes live.


Step 4: Use the Generated PDF

Once the PDF is generated, you can use it in various ways, such as viewing it with a PDF viewer control or sending it via email using Power Automate.

Conclusion

By following these steps, you can easily print the details of your canvas app edit form as a PDF and use it for various purposes. This functionality can greatly enhance the usability and versatility of your Power Apps solutions.

No comments:

Post a Comment

How to print the current canvas app edit form details as PDF from a button click?

Introduction Printing details from a canvas app edit form as a PDF can be incredibly useful for record-keeping, sharing, and documentation p...