Alternate techniques to view all types of documents stored in SharePoint Document Libraries within PowerApps

Document Viewing Techniques

In this demo 3 ( of 4 ) possible techniques are depicted to render the same documents stored in SharePoint Document Libraries within a Power App.

  1. Actual PDF documents
    ( Basic Flow )
  2. Word documents, PowerPoint presentations, HTML files (and numerous other document types) converted to PDF documents on-the-fly
  3. Thumbnail images of the documents generated on-the-fly
  4. Actual PDF documents
    ( Advanced Flow with Graph APIs )

Additional Info On Each Technique

1. Actual PDF documents (Basic Flow)

2. Word documents converted to PDF on-the-fly

Assuming you have a SharePoint Data Source connection to a SharePoint Document Library in your and that you have add a Gallery control to a screen in app and set the Items property on that Gallery control to the Document Library Data Source:

This following statement in the Document property on a PDF Viewer control will dynamically convert many document types to PDF you can display in your apps such as Word documents, PowerPoint presentations, HTML files. Loads more.

Substitute( Gallery1.Selected.'{Thumbnail}'.Large, "transform/thumbnail", "transform/pdf" )

3. Thumbnail images of the documents generated on-the-fly

Assuming you have a SharePoint Data Source connection to a SharePoint Document Library in your and that you have add a Gallery control to a screen in app and set the Items property on that Gallery control to the Document Library Data Source:

This following statement in the Image property on an Image control will dynamically generate a preview image of the first page of any give document selected in the Gallery control. This will work for most types of documents.

Gallery1.Selected.'{Thumbnail}'.Large

4. Actual PDF documents (Advanced Flow using Graph)

Specifically for PDF documents the best technique (in my opinion at least) is to use the “@content.downloadUrl” as is exposed using the PA_Graph_DriveItems flow and it’s very easy to test and see how it works using the demo app I’ve shared in following blog I’ve posted in this regard:


Wrapping up

There are in fact countless other techniques that equally work insofar as displaying all different types of documents within your Power Apps, many of which I have posted other blogs on this site describing alternative techniques.

The techniques described on this blog are my personal favourites that I thought would be worth calling out and surmising to “hopefull” clarify any confusion for any newcomers to this site!

Which technique would you use?

2 thoughts on “Alternate techniques to view all types of documents stored in SharePoint Document Libraries within PowerApps”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.