Skip to main content

Notifications

Dynamics 365 general forum

Embed a PDF that is in Sharepoint, into a Knowledgebase Article that is in Dynamics

Posted on by 10

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.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Embed a PDF that is in Sharepoint, into a Knowledgebase Article that is in Dynamics

    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 

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Embed a PDF that is in Sharepoint, into a Knowledgebase Article that is in Dynamics

    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.

    1538.x001.PNG

    Upload our PDF file as note attachment(the file will be saved into CRM)

    2806.x002.PNG

    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)

    8081.x003.PNG

    Rendered result:

    x004.PNG

    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

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans