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

Notifications

Announcements

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard