cancel
Showing results for 
Search instead for 
Did you mean: 
maqsoftware

Embedding Office Files as PDFs

Implementation Steps

  1. Store Files in SharePoint Document Library
    Ensure your Word, Power Point, and Excel files are stored in a SharePoint document library. This library will serve as the data source for the Power App
  2. Create a Connection in Power Apps
    1. Open Power Apps and create a new app or open an existing one
    2. Go to the Data tab and click Add data
    3. Search for SharePoint and select it
    4. Connect to your SharePoint site and select the document library where your files are stored
  3. Create a Gallery Connected to SharePoint
    1. Add a Gallery control to your app
    2. Set the Items property of the Gallery to the SharePoint document library connection you created
    3. Customize the Gallery to display relevant information, such as the document title or name
  4. Add a PDF Viewer Control
    1. Add a PDF Viewer control to your app
    2. Position it on the screen where you want to display the documents
  5. Implement Logic to Display Documents as PDF
    To display the selected document from the Gallery as a PDF, use the following steps:
    1. Select the Gallery control and ensure it is named appropriately (e.g., GalleryName).
    2. Set the Document property of the PDF Viewer control to the below formula. This will convert the selected document's URL from a thumbnail to a PDF.
      Substitute(GalleryName.Selected.Thumbnail.Large, "/thumbnail", "/pdf")
      maqsoftware_2-1718339347854.png

Output:
One of the PPT is being displayed in PDF Viewer

maqsoftware_1-1718339341431.png

Comments