Reply
How to force a download of pdf?
Old 01-08-2009, 11:53 AM How to force a download of pdf?
magicvw's Avatar
Extreme Talker

Posts: 197
Name: Vicky
Location: Brit in Bulgaria
Trades: 0
Not sure if this is in the right section, as I don't know how to begin doing it!

I have several pdfs on my site which I sell using Paypal. I am currently emailing them out on payment, but it's not a very efficient system, so I'm going to use the redirect feature on Paypal to send the buyer to a page with a link to the pdf.

I then want to have a button or link for the buyer to click to download the pdf to their own computer, rather than have the pdf opening up in the browser.

I guess html won't do this? PHP? Javascript? Anybody got a simple script/link where I can copy and paste some simple code?
__________________
My Music Theory

Blog
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
 
When You Register, These Ads Go Away!
Old 01-08-2009, 11:55 AM Re: How to force a download of pdf?
wayfarer07's Avatar
NYE-KEE

Posts: 3,136
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Put it in a zip file and point to it.
__________________
Wayfarer | jQuery Tooltip Plugin
Freelance Jobs Available
If Google is the Coca-Cola of Web search, Bing is RC Cola
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-08-2009, 02:03 PM Re: How to force a download of pdf?
King Spam Talker

Posts: 1,398
Trades: 0
If zipped html will work fine.

For security reasons you will need to change the return URL every now and then so people can not share the link with friends.

To comply with PP standards you must have the landing page and can not specify the download link as the return URL. You landing page should contain something like:
You have paid at PayPal and this is your download page.

The actual text is on the PayPal site.
__________________
Colbyt
colbyt is offline
Reply With Quote
View Public Profile
 
Old 01-08-2009, 03:23 PM Re: How to force a download of pdf?
AD7863's Avatar
15 Year Old Tech Blogger

Posts: 427
Name: Artful Dodger
Location: England, UK
Trades: 0
Yep, just put it in a zip folder and then upload it to your host space. Then just point to it. If somone clicks the link it should download automatically.
AD7863 is offline
Reply With Quote
View Public Profile Visit AD7863's homepage!
 
Old 01-08-2009, 04:11 PM Re: How to force a download of pdf?
magicvw's Avatar
Extreme Talker

Posts: 197
Name: Vicky
Location: Brit in Bulgaria
Trades: 0
Thanks! have done as instructed - just got to sit back and wait for someone to buy now

I've already used a Paypal landing page so I know the orders - but thanks anyway

Is it pretty universal that people have unzipping software? I put a link to WinZip on the page just in case.

Doing a zipped file is nice and simple so I'll probably stick with it, but out of interest, how would it be done without zipping a pdf? I know I have clicked on "download pdf" links before which get sent directly to my firefox downloads. How is that done - ie what kind of code?
__________________
My Music Theory

Blog
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
Old 01-08-2009, 04:51 PM Re: How to force a download of pdf?
wayfarer07's Avatar
NYE-KEE

Posts: 3,136
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Windows will automatically unzip anything (though not zip it), so that is no problem. Don't know about Mac, but I'd be shocked if it didn't.
__________________
Wayfarer | jQuery Tooltip Plugin
Freelance Jobs Available
If Google is the Coca-Cola of Web search, Bing is RC Cola
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-08-2009, 06:52 PM Re: How to force a download of pdf?
King Spam Talker

Posts: 1,398
Trades: 0
Quote:
Windows will automatically unzip anything
It will handle all zip files. It won't do tar, gz or rar files. For those you need winrar.
__________________
Colbyt
colbyt is offline
Reply With Quote
View Public Profile
 
Old 01-09-2009, 07:21 AM Re: How to force a download of pdf?
chrishirst's Avatar
Super Moderator

Posts: 21,624
Location: Blackpool. UK
Trades: 0
and only in WinXP and above
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How to force a download of pdf?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13366 seconds with 13 queries