March 20, 2025 - Modern businesses rely on the ability to access and manage documents efficiently, which is essential for organizations across all industries. Viewing PDFs within Canvas Apps is a powerful solution that combines functionality, flexibility, and integration with existing platforms like SharePoint and Power BI. This feature allows businesses to create an interactive, searchable, and user-friendly document management experience.
By leveraging tools such as Power Automate for automation, SharePoint for document storage, and the PDF Viewer component in Canvas Apps for rendering, organizations can streamline workflows and enhance productivity. Additionally, this capability can be seamlessly integrated into Power BI reports, enabling dynamic data filtering and real-time insights. This article provides a comprehensive guide to setting up and optimizing this solution to meet diverse business needs.
Key components of the solution
-
Canvas App PDF Viewer
This component, currently in preview, provides features such as zooming, scrolling, and keyword search within the PDF. -
Data URI
A crucial link that feeds the PDF into the Canvas App for rendering. -
Power Automate
Enables real-time automation to fetch PDFs from SharePoint and generate the required Data URI.
Step-by-step guide
-
Canvas App configuration
The Canvas App includes a gallery that displays a filtered list of documents. Users can select a document to view, initiating the process.
- Add a button to each gallery item to allow selection of the parent component:
btn_Select: OnSelect = Select(Parent) - Configure the gallery's OnSelect property to trigger a Power Automate flow. The flow uses the selected document's identifier to retrieve it from SharePoint:
Gallery: OnSelect = Set(vPDF, GetDataURI.Run(galInvoiceNumbers.Selected.'Invoice Number').result)
- Add a button to each gallery item to allow selection of the parent component:
-
Fetch and generate Data URI
The Power Automate flow retrieves file content from SharePoint and converts it into a Data URI. This step enables seamless integration with the Canvas App.
- Key expression for generating the Data URI:
datauri(base64ToBinary(body('Get_file_content_using_path')?['$content']))
- Key expression for generating the Data URI:
-
Display in PDF Viewer
The Data URI is returned to the Canvas App, where the PDF Viewer component renders it, providing users with an interactive interface to view the document.
Additional functionality
Power Fx filtering
Use Power Fx to pre-filter the gallery, ensuring users see only relevant documents. For example, in a medical context, you can display PDFs related to the current patient’s record.
Integration with Power BI
Extend this functionality to an embedded Canvas App within a Power BI report. This integration allows users to view PDFs in real-time, paired with powerful data filtering capabilities, such as filtering invoices by date, amount, or status.
Benefits
-
Enhanced PDF functionality
Users can search, zoom, and scroll through PDFs for a rich viewing experience. -
Dynamic data filtering
Whether using Power Fx or Power BI’s filtering engine, users access relevant data in real-time. -
Ease of use
The streamlined interface ensures users can effortlessly locate and view PDFs, boosting productivity.
Unlock the power of integrated document management
The integration of Canvas Apps, SharePoint, and Power BI offers a cutting-edge solution for managing and viewing PDFs. By enabling advanced PDF functionality, dynamic data filtering, and seamless automation, this approach enhances productivity and ensures a user-friendly experience. Whether streamlining invoice management, accessing patient records, or enhancing operational workflows, this solution is adaptable to diverse business scenarios.
Now is the time to take your document management to the next level. Explore the capabilities of Canvas Apps and start building an interactive PDF viewing experience tailored to your organization’s needs. Get started today by leveraging the power of SharePoint, Power Automate, and Power BI to create a truly integrated and efficient system. For questions, reach out to your Citrin Cooperman advisor or Andrew Yoder at sales@citrincooperman.com.
Take a look at other articles in this series for other tips and tools:
Related Insights
All InsightsOur specialists are here to help.
Get in touch with a specialist in your industry today.