I have a PDF file that I have saved in central repository within Sharepoint. I am creating a Knowledge Article in Dynamics and wanted to see if anyone knew how to embed the PDF. I want the person to have the ability to click the article and the PDF file display the contents on that page.
Thanks.
Hi joekerr,
If hosting the PDF file on SharePoint would be your requirement,
so you could search for how to get Direct Link from SharePoint Shared URL,
once you got such a link that every people could view it publicly,
then just replace the URL in iframe parameter.
Regards,
Clofly
Hi joekerr,
It could be hard to fetch direct link of document type files compared with image files,
while another question is Sharepoint will prevent the shared PDF page being rendered in iframe if we embed shared link in iframe element due to Same Origin policy.
Instead, I would give an unsupported way as alternative.
1. Create a Web File which stores our PDF files in Portal.
Upload our PDF file as note attachment(the file will be saved into CRM)
From below steps, we will get a Direct Link to the pdf file: xxx.powerappsportals.com/ka01
2. Embed an iframe URL below to our knowledge article HTML source code:
<iframe src="docs.google.com/gview?url=xxx.powerappsportals.com/ka01&embedded=true" style='width:100%; height:500px;' frameborder='0'></iframe>
replace file URL to what your like.
This is an undocumented feature of Google Docs, it can embed and present a pdf file on web page.
http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html
(However, Google Docs is not required, its could be regarded as an interface)
Rendered result:
I tested it successfully in Chrome 76.0.3809 64-bit and Firefox 69.0.1 64-bit and IE 11.737,
but got failure in Edge 44.17763.
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156