Page 1 of 1
How to add PDF to your site
Posted: Sat Oct 04, 2014 11:48 am
by zinc
The simplest way to add/embed a PDF to your site, is to:
1. Add a plugin from the tool box
2. Place it on your page, the way you want
3. Add the PDF file by browsing for it.
That simple!
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 1:11 pm
by jerryco
This will force the pdf to load on the user's machine (popup to view or download).
Put this in filename.php. Call that from WYSIWYG Web Builder (after uploading it).
<?php
header("Content-disposition: attachment; filename=filename.pdf");
header("Content-type: application/pdf");
readfile("filename.pdf");
?>
And then put the filename.pdf in the root of your website. (public_html probably)
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 1:44 pm
by zinc
jerryco wrote:This will force the pdf to load on the user's machine (popup to view or download).
This is not correct. It embeds the PDF on the page. I have tested it both with IE, FF, Chrome as well as Nitro PDF Pro & Adobe Acrobat Reader.
Try this temp link
http://bit.ly/1oHLMhv
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 2:20 pm
by jerryco
May I have the link to the .php file? I don't think it will owrk on index.php files?
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 2:26 pm
by zinc
Why PHP? There is no PHP file. This is standard HTML file. See the source in the link I gave you.
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 2:27 pm
by jerryco
Put this in filename.php
You need a php file. To see it can be done visit
http://www.jebentnietgek.nl and click the button on the right side.
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 3:39 pm
by jerryco
This will force the pdf to load on the user's machine (popup to view or download).
You probably had mistaken that to be a comment on your way in the first post, right? I am sorry. It's a standalone solution for forcing a download or open locally.
Re: How to add PDF to your site
Posted: Sat Oct 04, 2014 4:34 pm
by BaconFries
Coughs....how to embed a PDF
viewtopic.php?f=26&t=49793
Re: How to add PDF to your site
Posted: Sun Oct 05, 2014 1:19 pm
by zinc
LOL @BaconFries
The Plugin is by far the easiest way and almost under rated feature, I am not sure what Jerryco was referring, but did not make any sense at all as all the things he mentioned are totally unnecessary and it does not throw any errors that he was mentioning. I am almost sorry why I even started this thread.

Re: How to add PDF to your site
Posted: Sun Oct 05, 2014 1:35 pm
by BaconFries
lol each to there own thats why...