Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to show pdf

Go to End

11 Posts   4645 Views


Community Member, 8 Posts

30 September 2009 at 7:38am

I'm very new to silverstripe. Is it possible to show a pdf-file inside the content-section?
What I have to do to manage that?

Thank you,


Community Member, 215 Posts

30 September 2009 at 9:29am

Hi there,

This can't be done with SilverStripe directly but you can certainly use another service to display a pdf withen a silverstripe site. One service that I have used with success is here To do this you have to upload a pdf somewhere on the internet (you could upload it through the Files and Images tab in silverstripe) then paste the location of it into the input box. Once you hit "Generate Link" the bottom block of code is an Iframe which can be pasted into the HTML code of a page in the CMS. I'm not sure if the Iframe gets stripped out by TinyMce but give it a go :)

Hope this points you in the right direction :)


Community Member, 279 Posts

30 September 2009 at 9:46am

The gallery module supports pdf. I don´t know how it works exactly but you could give it a try.


Community Member, 283 Posts

30 September 2009 at 4:11pm

There is always a quick and dirty solution, like the above with Google Docs.

Try in an iframe, perhaps?


Community Member, 8 Posts

1 October 2009 at 2:25am

Hi all,

thank you for your replies. Howardgrigg, what do you mean with "This can't be done with SilverStripe directly "? May be I was unclear. If I habe a pdf-file in /assets/uploads, say test.pdf. Then I want to have a link in a menu to that file, so if anybody select this menuitem the pdf is shown inside the contenarea like any other page of my website.
Normally i would use the iframe tag for this problem in conjunction with some javascript code to fill the whole contentarea. Is something possible this way without the use of external helpers (google)?



Community Member, 712 Posts

1 October 2009 at 10:19am

Edited: 01/10/2009 10:23am

PDF content is not something most browsers are able to display 'out of the box'.

That means that unlike an image or text (or Flash content, to a certain degree) there is no way for a browser to imbed the pdf content within your page html without some sort of a 3rd party service to convert it into something browser-readable, or an iframe to bypass the rendering of the current frame entirely.

An iframe gets around this by using whatever pdf viewer plugin your browser has installed. This makes it appear as if it were embedded within the page, but is really rendered as a separate element. This is the easiest way to do it without using a 3rd party service, but the result will depend on what the user has installed.

Personally, I'd go iframe - it is the most stable solution and reduces your reliance on 3rd party services (not to mention the habit of these 3rd party services to extract payment in the form of allowing them access to your documents).


Community Member, 8 Posts

1 October 2009 at 6:51pm

Hi Hamish,

of course, I need a browser plugin as you said, but how can I integrate an iframe in my pages? When I use the TinyMCE with the html-button, it only shows, e.g. the code for a link, I can't edit the html-code.




Community Member, 8 Posts

21 October 2009 at 4:39am


I found this
or this (I don't know what link is working, because its in the archive)
to integrate an iframe modul.
I followed the install instructions, but I got no new pagetype. Does an older modul work with
Silverstripe 2.3.3?
I have the same problem with the flickrmodul. There is no new pagetype.

Can anyone help please?

Go to Top