How to add PDF to your site

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
Post Reply
User avatar
zinc
 
 
Posts: 2146
Joined: Sat Dec 08, 2007 3:06 pm
Location: London, United Kingdom
Contact:

How to add PDF to your site

Post 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!
Running WYSIWYG Web Builder since 2007...
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: How to add PDF to your site

Post 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)
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
zinc
 
 
Posts: 2146
Joined: Sat Dec 08, 2007 3:06 pm
Location: London, United Kingdom
Contact:

Re: How to add PDF to your site

Post 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
Running WYSIWYG Web Builder since 2007...
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: How to add PDF to your site

Post by jerryco »

May I have the link to the .php file? I don't think it will owrk on index.php files?
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
zinc
 
 
Posts: 2146
Joined: Sat Dec 08, 2007 3:06 pm
Location: London, United Kingdom
Contact:

Re: How to add PDF to your site

Post by zinc »

Why PHP? There is no PHP file. This is standard HTML file. See the source in the link I gave you.
Running WYSIWYG Web Builder since 2007...
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: How to add PDF to your site

Post 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.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: How to add PDF to your site

Post 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.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
BaconFries
 
 
Posts: 5325
Joined: Thu Aug 16, 2007 7:32 pm

Re: How to add PDF to your site

Post by BaconFries »

Coughs....how to embed a PDF
viewtopic.php?f=26&t=49793
User avatar
zinc
 
 
Posts: 2146
Joined: Sat Dec 08, 2007 3:06 pm
Location: London, United Kingdom
Contact:

Re: How to add PDF to your site

Post 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. :(
Running WYSIWYG Web Builder since 2007...
User avatar
BaconFries
 
 
Posts: 5325
Joined: Thu Aug 16, 2007 7:32 pm

Re: How to add PDF to your site

Post by BaconFries »

lol each to there own thats why...
Post Reply