web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PDF Viewer not working.
Power Apps
Unanswered

PDF Viewer not working.

(0) ShareShare
ReportReport
Posted on by 35

Hi Everyone,

My project is about display PDF from SharePoint Document Library. Created a Gallery by listing the Files from selected Folder.

AIDENMJ_0-1659424640708.png

Used PDF viewer to display the selected PDF.

OnSelect from Gallery Control:

 

 

 

UpdateContext({viewPDF:true});
Set(selectedPDF,Substitute(Gallery.Selected.Thumbnail.Large,"transform/thumbnail", "transform/pdf" ));

 

 

 

 

Document from PdfViewer:

 

 

 

selectedPDF

 

 

 

 and tried

 

 

 

Substitute(Gallery.Selected.Thumbnail.Large,"transform/thumbnail", "transform/pdf" ))

 

 

 

 

Getting error.

AIDENMJ_1-1659424854956.png

Clicking 'Open in my browser instead', getting this json.

 

 

 

{"error":{
 "code": "notSupported",
 "message": "csv",
 "innererror": {
 "code": "InputFormatNotSupported"
 }
}}

 

 

 

 

Where if I used Link to Item.

I can't view from PdfViewer. But when I click on 'Open in my browser instead'  It opens the pdf.

 

I followed @Reza Doraini guide from https://www.youtube.com/watch?v=vqK29FWbLxU&t=813s

I am stuck in with this issue now. Anyone have any idea what I missing please help me out.
Thanks.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @AIDENMJ ,

     

    Please try:

     

    1\Create a flow(BofFlow0804):

    vbofengmsft_0-1659581053919.png

    datauri(base64ToBinary(body('Get_file_content')?['$content']))

    2\Insert the flow into your app:

    vbofengmsft_1-1659581144558.png

     

    3\OnSelect from Gallery Control:

    UpdateContext({viewPDF:true});
    Set(selectedPDF,BofFlow0804.Run(ThisItem.Identifier).thepdf)

     

    I think this link will help you a lot:

    Power Apps View A PDF Stored In A SharePoint Document Library 

    Best Regards,

    Bof

     

  • AIDENMJ Profile Picture
    35 on at

    Hi sorry for late reply, 

    I prefer not use flow. It'll be another point of failure I afraid. I want just powerapp & sharepoint connection. MS Flow needed to be monitored and everytime my password changed I need to reconnect the connections. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard