Resources For IT Professionals

# SharePoint 2010: How to Embed PDF and Text File Contents into Pages

## Embed PDF in a SharePoint Wiki Using a Content Editor Web Part

I was presented a requirement where some of the site administrators wanted to show contents from PDF and text files to many pages in our sharepoint sites. The content was either text or images. There is always a way to add this under the page controls and pods but it was not an effective way of doing so since for any change in the requirement it has to be carried out in all pages manually. Hence I used the content editor webpart to display the text. The file was stored in a document library and it was being referred by my content editor webpart so any changes in the file will be reflected in my pages as well. To refer the file in my content editor webpart I used the following script in source editor of my webpart :

`<iframe width=``"560"` `height=``"345"` ``` src=````"FileUrl"` ``` frameborder=````"0"` ``` ></iframe>```

The height and width can be changed based on your requirement.

## Embed PDF in a SharePoint Wiki Using a Page Viewer Web Part

A PDF document can be inserted in a SharePoint Wiki page by using a Page Viewer web part as follows -
1. Upload the PDF file to a SharePoint library.
2. Edit the Wiki page where the PDF has to be embedded and insert a Page Viewer web part.
3. Edit the basic properties of the web part to give the PDF URL, web part title and a height specification.
More details and screenshots are in this blog post -

## Other Languages

French (fr-FR)
Wiki - Revision Comment List(Revision Comment)
• Gokan Ozcifci edited Revision 3. Comment: content, title and tag

• Benoit Jester edited Revision 5. Comment: TOC formatting

• Benoit Jester edited Revision 6. Comment: Formatting

• Richard Mueller edited Revision 7. Comment: Modified title casing, added tags

• Richard Mueller edited Revision 8. Comment: Fix TOC

• Aalam Rangi edited Revision 1. Comment: Gave headers and added a section for Page viewer web part

Page 1 of 1 (8 items)
Wikis - Comment List
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
• Gokan Ozcifci edited Revision 3. Comment: content, title and tag

• Benoit Jester edited Revision 5. Comment: TOC formatting

• Benoit Jester edited Revision 6. Comment: Formatting

• Richard Mueller edited Revision 7. Comment: Modified title casing, added tags

• Richard Mueller edited Revision 8. Comment: Fix TOC

• Aalam Rangi edited Revision 1. Comment: Gave headers and added a section for Page viewer web part