Online Training On SharePoint
                      

Thursday, 1 May 2008

Showing PDF document content in SharePoint

For showing content of pdf files in MOSS we can use Content Editor Web Part. To get this working we need to follow following steps:
1. Add the Content Editor Web Part to SharePoint Page. Then Add a “Content Editor Web part” to your SharePoint page. Now clicck on the “Open the Tool Pane”, click on “Source Editor” to place the HTML source.

2. Place the following piece of code in to the Source Editor:

The src goes to the location where the pdf files are stored. It can be in document library or a UNC Path.

3. Make sure pdf client is installed in the client machines .

You may find interesting to read: How to show movie files in SharePoint Pages

Attempt a question on Web Parts: Question on Web Parts

12 comments:

Unknown said...

When you mention in step 3 that you should "Make sure you have pdf client is installed.", are you refering to having Adobe Reader installed on the WFE or on the client machine. I am unable to get this to work.

Unknown said...

It needs to be installed on the client machine. This is working fine for me. I just checked it again. If you have any issue with this let me know I can hlp you.

Unknown said...

After some digging, the issue related to the PDF not rendering in the browser was related to the settings in Adobe Acrobat. Acrobat needs to be set to "Display PDF in browser". One side effect to this setting is that any PDF that is attempted to be opened from the Internet will be opened in the browser and not in the reader program.

Unknown said...

That is useful info. thanks for that. Can you share how you disabled the settings.

Unknown said...

The setting for "Display PDF in browser" vary depending if you use the full Adobe Acrobat version or the just Adobe Acrobat Reader. For Adobe Acrobat Reader version 8.1.2, the "Display PDF in browser" setting is adjusted as follow:

Edit -> Preferences -> Internet - > Web Browser Options

There is a check box "Display PDF in browser"

Karthik said...

Hey Manish - does it have to be a http://myfile.pdf for it to display? What if I have them dropped in a file share and want to display the pdf? The problem I have is that this will be dynamic. I will be creating 100 reports, that will go into 100 different locations, and i want to dynamically configure the name of the location based on who is logging in to share point? Does it make sense? Please let me know. Thanks!

Unknown said...

I can't make out the piece of code to place in the Source Editor.

it looks like:

|cembed height = "500"

Is that right? or is that a curser before the c?

Unknown said...

it is <embed height="500" src="pdf URL" type = "application/pdf" width="500">

kuk said...

can't it be made like i select the PDF document and it would display, As you have hardcoded it, it will display only one PDF at a time and next time i have to hard code again for my next PDF file is it that way

Anonymous said...

Thank you for posting this! I was able to get it to work on my PC. Been struggling with this for a few days. The Adobe Reader preferences change was my problem.

Drew

cloud hosting india said...

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain knowledge, would you mind updating your blog with extra information? It is extremely helpful for me.

Rawcoder said...

hi,

i still have problems with this.
I'm using sharepoint foundation. I did everything you wrote and get it work first. But then decided to change the path of the pdf and so need to change the , but still got the old pdf. After trying around broke the hole page and startet this side from sketch on. But now it doesn't work. I do not understand what's wrong.

If you or someone has a solution for this.....

Related Posts with Thumbnails