Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

PowerApps PDF Viewer SharePoint Document Library without flow

RezaDorrani Profile Picture Posted by RezaDorrani 12,141

In this Power Apps tutorial video, we will explore how to use the PDF Viewer control in Power Apps to show PDF files & Office documents (Word, PowerPoint, Excel) from SharePoint Document Library without using Power Automate flows. PowerApps PDF Viewer control is using the API to transform Office documents into a PDF file. We can also use the Thumbnail property to show document previews. This entire concept showcases using the PowerApps PDF viewer control without flow.

 

#PowerApps #PDF #SharePoint


Thanks,
Reza Dorrani, MVP
YouTube
Twitter

Categories:

General PowerApps

Comments

  • AKD_Kavinda Profile Picture AKD_Kavinda 23
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    Hi @RezaDorrani this is very useful video Thank you for sharing, when I changed the url, thumbnail to pdf it's not working. can you please explain how to overcome this problem. 

  • jennisho Profile Picture jennisho 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    @timt0m  - Update: not quite there. For ME that's those are the correct Mid values. Apparently, that's not the case for everyone.

    1. My guid has dashes; theirs does not. (Worth noting: inserting a guid without the dashes in my particular string breaks the link.)
    2. I have an extra bit in my appres string that they do not have - "shared-sharepointon1-".

    I can work with that, but I have no idea why there's a difference or how to standardize it. Frustrating, but I'll get there.

  • jennisho Profile Picture jennisho 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    A million thanks - you have no idea! The values for Mid that I needed to use for our org were 197,36. It works for me, but it always did. I have no one available to test it right now, so I guess I'll find out for sure in about 6 hours.

     

  • timt0m Profile Picture timt0m 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    Yea, there was a comment in the YouTube video, I found to work. Basically you add a pdf to the root of the folder and put its link in the Pic column. 
    what I did was *(I use formulas), but could do it with set too. 
    a

    Appres= lookup(data source, name=pdf doc, Pic)

    another variable to hold the guid and I think it was like 170 first char to start at than 32.

    use

    AppresID=Mid(Appres, 170,32)

    than inside of the Appres with that GUiD value you add in “& AppresID &” than each users GUiD will be in that spot. Not at my computer so the Mid value might be wrong, but it was like 170 or 171. 

  • jennisho Profile Picture jennisho 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    @P3erky87 and @timt0m - I came here looking for a solution for the same issue. I read that the "appres://..." is dynamic and will be different for each user in the organization (which I believe is what @timt0m was saying).  Has anyone found a workaround for this that doesn't involve a flow? If I find one I'll come back and update, but I'm losing hope and almost ready to return to flow (which I very much want to avoid).

     

  • timt0m Profile Picture timt0m 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    @P3erky87 This is the same issue I am facing as well. It seems to be a GUID for that {specific user} in the appres:// from the *gal.selected.pic column

  • P3erky87 Profile Picture P3erky87 4
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    This works perfectly for me but not for others within my organisation. Is there some permissions missing or is there something missing in the hyperlink?

  • knoseworthy_sjc Profile Picture knoseworthy_sjc 26
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    Looks like your "ADDING" a power Automate flow when we are trying not to.

  • kky1 Profile Picture kky1 550
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    @knoseworthy_sjc - In the end, I gave up on this method and instead used a power automate flow to generate the PDF. There are many videos on that method too. I think the one I followed is Show PDF files from SharePoint in PowerApps - Bing video

     

    The gallery OnSelect is Set(varDocumentCurrent, [here is the name of your flow].Run(Gallery1.Selected.Identifier).result)

    varDocumentCurrent is a global text variable.

    Insert a PDFViewer on the screen and set its Document to "varPDF.pdfcontent"

     

    Hope this is helpful!

    Kendra

     

  • knoseworthy_sjc Profile Picture knoseworthy_sjc 26
    Posted at
    PowerApps PDF Viewer SharePoint Document Library without flow

    Getting same thing wondering if they made changes to url columns structure?