embed a pdf in webpage created using wordpress

I'm using a them from elegantthemes.

I want to embed a pdf into the webpage. Also, the user must have an option to download it in pdf format  manually.

Thanks!
dshrenikAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
I don't think you can do that directly.  Browsers require plugins to display PDFs.   PDF is not a format like JPG and GIF that browsers will display directly.  You might be able to put it in an iframe but that will still depend on the viewer having the PDF plugin installed.
0
dshrenikAuthor Commented:
Let us assume that the viewer has the PDF plugin installed.
0
Dave BaldwinFixer of ProblemsCommented:
Then try the iframe method.  You don't want to try to open in your main page because the plugin will use the whole page to display the PDF.   Here's a demo that works and a screen shot.  Notice that the Adobe Reader tool bar shows at the top.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>PDF iFrame test</title>
</head>
<body>
<h1>PDF iFrame test</h1>
<p>This is the body.</p>
<iframe height="444" width="555" src="test.pdf"></iframe>
</body>
</html>

Open in new window

PDFiframe.jpg
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

dshrenikAuthor Commented:
Thanks!

Right now, there is a lot of whitespace between the page title and the iframe. Also, can I automatically set the size of the iframe to the max possible?
0
dshrenikAuthor Commented:
I toko care of the whitespace.
0
dshrenikAuthor Commented:
Also, can I have a black border around the iframe?
0
dshrenikAuthor Commented:
Sorry for the multiple requests. Can I have the iframe to be centre aligned within the page layout?
0
Dave BaldwinFixer of ProblemsCommented:
Here's the info on iframes: http://www.w3schools.com/tags/tag_iframe.asp  You can center it by putting <center> tag around it.
0
Jason C. LevineDon't talk to me.Commented:
Late to the party but you can also use scribd.com and the Simpler iPaper plugin to get a really nice PDF display with download options.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.