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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

embedding PDFs


Go to End


2 Posts   1822 Views

Avatar
mirakelsey

Community Member, 9 Posts

28 June 2011 at 9:21am

Hey all, I'm trying to wrap up coding for the resources in the site I'm working on, and I just need a push in the right direction.

I'm building a portfolio site for a writer. The idea is that one page is a list of articles, stories, etc she has written, and when you click on a link it takes you to a new page, still within the site, but with the pdf of said article embedded within the content area (underneath its title). I want to avoid using third-party tools like Scribd for this, so my client can upload everything on her site and not elsewhere.

So my question is, is it possible to embed a PDF into the content of the page, and if so how do I code that into a resources template?

(sorry if my explanation sounds garbled. I've attached mock layout sketches to help with that.)

Attached Files
Avatar
Invader_Zim

Community Member, 141 Posts

28 June 2011 at 8:27pm

Hi.

Maybe this is what you are looking for: PDFObject
From their site: "PDFObject is an easy-to-use method for dynamically embedding PDF files into HTML documents. It uses JavaScript to generate and inject a standards-friendly... bla bla"

I've never used it (and I'm not related in any way with PDFObject), so I don't know how hard it will be to integrate that thing into a SilverStripe installation.

Cheers
Christian