Display PDF Files in Content Editor Web Part

We can display PDF files inside content editor web part. Here is how:add a Content Editor web part to the page and place the object tag as below in HTML Source of the content editor web part.

Using Object Tag to display PDF document in CEWP:

<object width="400" height="500" type="application/pdf" data="https://sp10.Crescent.com//MCM/Documents/Pre-Reads.pdf?#zoom=75&scrollbar=1&toolbar=1&navpanes=1" id="pdf_content">
sharepoint pdf content editor web part
show pdf file in content editor web part

and the output on web page: pdf file in content editor web part

sharepoint display pdf in web part

Using Embed Tag: 
This can be achieved using embed tag as well.
<embed src=”https://sharepoint.company.com/documents/SharePointMCM.pdf” width=”500″ height=”375″>

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

4 thoughts on “Display PDF Files in Content Editor Web Part

  • ticed is that, when i pull up the site on an ipad, it wont let me scroll and it only displays the top half of the pdf. Any ideas on how to fix? thanks!!

    Read more: https://www.sharepointdiary.com/2012/05/display-pdf-inside-content-editor-web.html#ixzz3YaqUfoLn

    Reply
  • Hello,
    Many thanks for the solution! One thing i noticed is that, when i pull up the site on an ipad, it wont let me scroll and it only displays the top half of the pdf. Any ideas on how to fix? thanks!!

    Reply
  • Hi

    Do you know if there’s any additional code to add and remove the default PDF options like save. Even after adding extra security settings to the PDF we can still see the option. I’ve managed to remove print however. I’m using the embed code.

    Thanks
    A

    Reply
    • Well, You can disable Save/Copy in PDF files by setting restrictions using Adobe PDF Writer.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *