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 / Preview SharePoint Onl...
Power Apps
Answered

Preview SharePoint Online document (in an IFRAME) in model-driven apps? (and canvas apps)

(0) ShareShare
ReportReport
Posted on by 379

Is there a way to display SharePoint Online hosted documents in a model-driven app? The scenario is a user needs to review a document (usually a PDF) and transcribe data into the app. It would be useful to have the document side-by-side in the app forms.

 

I am talking about actually rendering the document, not simply using Document Management to render a list of related docs stored in SharePoint.

 

In Canvas apps, I've tried some 'hacks' to get the Canvas PDF Viewer to render thumbnails. Even the highest resolution thumbnails are too grainy to read for our PDF forms.

 

I was hoping we could get the full SharePoint document preview functionality embedded in our model-driven or canvas apps.

 

Thanks!

I have the same question (0)
  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @LenC 

     

    There are multiple ways available.

     

    Way 1:

     

    Add an iframe in a Tab then Onload of the Form (using JavasScript) get the Document Location URL and bind it.

     

    Way 2:

     

    Create a button --> On Click of button Use Javascript to open SIDE PAN --> In the Side Pan --> Call the JS and Bind IFRAME there 

     

     

    Let me know if you need more details

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • Len C Profile Picture
    379 on at

    Thanks, @rampprakash. I do see if I use a direct URL to a SharePoint PDF, and allowed xss, the built-in IFRAME control rendered a PDF using the browser's own PDF viewer (which is arguably more usable than SharePoint's PDF previewer).

     

    I'll have to quickly study up on scripting and event handling, but this looks like the path.

  • Joseph Nasr Profile Picture
    67 on at

    Hello is there video/tutorial on this?? How do you do the binding? 

     

    I am currently having this issue where I have an Iframe showing a SharePoint Document Library, I need to select some files, and run a power automate flow (from the Sharepoint appearing in the Iframe) but I need the values of 3 fields that are in the record's form (above the Iframe) for the flow.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard