Welcome to WebmasterWorld Guest from 54.198.185.204

Forum Moderators: mack

Message Too Old, No Replies

Incorportating PDF's

Pdf

     
5:27 pm on Aug 23, 2005 (gmt 0)

New User

10+ Year Member

joined:May 17, 2005
posts:6
votes: 0


I have 3 PDF files I want to put on the site, when they click on the link I want to ask them if they want to open it or download it.

Please could somebody tell me how to do this.
Thanks

8:15 pm on Aug 23, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 11, 2005
posts:386
votes: 0


You don't need to do anything besides make a link to the PDF. Files that are handled outside your web browser default to show that prompt you are thinking of... it is a prompt from your browser, not from the code of a webpage. If you're talking about FORCING a user to see that prompt, regardless of whatever download preferences they may have set, that's another thing, but I wouldn't advise messing with people's prefs.
8:22 pm on Aug 23, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 17, 2001
posts:1262
votes: 0


You can't force the option to appear; as Don Hoagie notes it is a setting on the client side. One workaround is to provide two links, one to a PDF (which will usually open in a browser window) and another to a ZIP file containing the PDF (which will usually prompt to be saved locally).
8:39 pm on Aug 23, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Feb 18, 2005
posts:262
votes: 0


For many users that isnt the case; if you have a PDF reader installed (say adobe) IE will open the PDF in that program. I have around 40 on one of my sites.
4:08 pm on Aug 24, 2005 (gmt 0)

New User

10+ Year Member

joined:May 17, 2005
posts:6
votes: 0


Thank you once agian sound advice. Not quite sure what I would do with out the brains from this site.

Thank you

5:45 pm on Aug 25, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Dec 10, 2001
posts:254
votes: 0


You can't force the option to appear

Not exactly correct. . . but nearly so. It is a real pain to work around the default browser behavior (which is to open the file for if the user has the application installed on their machine), but there are some scripts that can be used to do so. There is a way with php, for instance. But certainly not with straight HTML or simple javascript.

So, for most the best way to keep the file from opening is to provide an alternate zip version.

Of course, there IS one other way built into all browsers that doesn't require ANY additional files or code -- simply include a line instructing your users to RIGHT-click on the link and choose "Save Target As. . . " All depends on what you think is reasonable to expect of the users of the particular web site.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members