By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

Is a "ZIP" extension the ONLY way to force a "SAVE AS" for your PDF?

P: n/a
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to
force the file to be saved, and in any event _not_ opened.

Since the PDF will be in his cache in any event, I would just as soon place the
employer in control of what directory he wishes to save it in, and there are two
salient reasons for this:
1. I want him to OWN the document
2. I want him to FIND the document, quickly, on his hard drive
In any event I don't want it buried in his cache and so easily abandoned.

Under normal circumstances I would be comfortable with the client (not to mention the
browser) exercising discretion as to the disposition of a PDF file — appreciate that
I am PUSHING this one document to him with the express intent of withholding his
option to dispose of it so easily. ;)

I think I understand two points viz this "FORCE A SAVE-AS" issue, but correct me if
I'm wrong:
1. This isn't something you can code into your HTML (it is an HTTP function)
2. I would need to run some sort of script to override the client's browser instinct
and/or preference settings

I so badly don't want to have to zip this file, but I will as a last resort.

I had one clever thought as to a workaround (forgive me if it is amateur) and it was
this: Is there a way to simply code into the HTML something like
myfile.pdf = OPEN, FALSE
or
myfile.pdf = DO NOT OPEN

?

Alternatively, does anyone know of a freeware script, somewhere, that I could modify
and use to get this to work?

I don't think many people appreciate how tricky this issue is! I can't believe how
many posts I've read on this ONE ISSUE. Amongst various other scripts I've seen are

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Content-Disposition: attachment; filename=MYFILENAME.pdf"
"Content-type: application/pdf"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
and

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
header("Content-Type: $mimetype";
header("Content-Length: $filelength");
header("Content-Disposition: attachment; filename=$filename")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I do realize how difficult this is but any alternatives to renaming it with a ~.zip"
extension would be so appreciated. Thanks everyone!

Angel
Jul 20 '05 #1
Share this Question
Share on Google+
27 Replies


P: n/a
On Tue, 10 Aug 2004 12:43:16 -0700, Curious Angel <by*******@usa.net>
wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks
the link to
force the file to be saved, and in any event _not_ opened.


If I left-clicked a link and a box came up instead of normal browser
operation, I'd become confused and likely run away. Don't want this,
especially for your resume. Let the poor employer handle it as he normally
would. If he wants to save it he can right-click.
Jul 20 '05 #2

P: n/a
In article <op**************@news.individual.net>, ne*****@yahoo.com says...
On Tue, 10 Aug 2004 12:43:16 -0700, Curious Angel <by*******@usa.net>
wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks
the link to
force the file to be saved, and in any event _not_ opened.


If I left-clicked a link and a box came up instead of normal browser
operation, I'd become confused and likely run away. Don't want this,
especially for your resume. Let the poor employer handle it as he normally
would. If he wants to save it he can right-click.


That is not what I want him to have, and a quick search on GOOGLE reveals hundreds of
other people who want this kind of control, as well. But I'm glad you made this
comment, because we can now dispense with that wing of the party LOL. I have heard
you.

Now for the legions of us who, for better or worse, want this option, any thoughts on
a workaround other than zip? Because what is not, absolutely, going to happen is a
dynamic opening of this file in the employer's browser. Either I can ease his
journey to the land of "SAVE AS" with one operation . . . or suffer him to download a
zip file and extract it in two.

Angel
Jul 20 '05 #3

P: n/a
On 10/8/04 8:58 pm, Curious Angel wrote:
In article <op**************@news.individual.net>, ne*****@yahoo.com says...
If I left-clicked a link and a box came up instead of normal browser
operation, I'd become confused and likely run away. Don't want this,
especially for your resume. Let the poor employer handle it as he normally
would. If he wants to save it he can right-click.


That is not what I want him to have, and a quick search on GOOGLE reveals
hundreds of other people who want this kind of control, as well. But I'm
glad you made this comment, because we can now dispense with that wing of
the party LOL. I have heard you.

Now for the legions of us who, for better or worse, want this option, any
thoughts on a workaround other than zip?


AFAIK there isn't a reliable way of doing this. But why should you care? I
think most people are savvy enough to right-click on a link if they want to
download a file instead of viewing it online. If they *have* a right button,
that is.

But anyway, you could try rigging your server to send a
"Content-Disposition" header -- something like this perhaps:

Content-Disposition: attachment; filename="my-groovy-resume.pdf"

But bear in mind that this is NOT part of the HTTP standard, so don't get
upset if it doesn't always work.

There appears to be more information on the subject here:
<http://www.codestore.net/store.nsf/unid/EPSD-59MN9J?OpenDocument>

HTH

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #4

P: n/a
Your line length is too long.

Curious Angel wrote:
In article <op**************@news.individual.net>, ne*****@yahoo.com
says...
On Tue, 10 Aug 2004 12:43:16 -0700, Curious Angel <by*******@usa.net>
wrote:
> I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT
> clicks the link to force the file to be saved, and in any event _not_
> opened.
If I left-clicked a link and a box came up instead of normal browser
operation, I'd become confused and likely run away. Don't want this,
especially for your resume. Let the poor employer handle it as he
normally would. If he wants to save it he can right-click.


That is not what I want him to have,


It is what the employer wants, though. That's what should guide your
decision here.
and a quick search on GOOGLE reveals hundreds of other people who want
this kind of control, as well.
That doesn't mean they will get it.
But I'm glad you made this comment, because we can now dispense with that
wing of the party LOL. I have heard you.

Now for the legions of us who, for better or worse, want this option, any
thoughts on a workaround other than zip?
The best workaround I know of is to quit wanting this.
Because what is not, absolutely, going to happen is a dynamic opening of
this file in the employer's browser.
Really? You don't know this, you don't know the employer's browser, you only
know the type of data you want to serve and the proper MIME type for it.
You can't possibly be blamed for the incorrect operation or setup of
someone else's browser.
Either I can ease his journey to the land of "SAVE AS" with one
operation . . .
Nope.
or suffer him to download a zip file and extract it in two.


Actually, nope again. This keeps other employers who might actually want to
hire you from opening your resume' easily. Do you really want this?
Probably not.

--
Shawn K. Quinn
Jul 20 '05 #5

P: n/a
Curious Angel wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT
clicks the link to force the file to be saved, and in any event _not_
opened.
You cannot control this, no matter how much you want to.
Since the PDF will be in his cache in any event, I would just as soon
place the employer in control of what directory he wishes to save it
in,
If you want the employer to be in control, then serve the pdf file with
the correct mime type, and let the employer decide whether to open it
directly or save it.
1. This isn't something you can code into your HTML (it is an HTTP
function)
Correct.
2. I would need to run some sort of script to override the client's
browser instinct and/or preference settings


There's no reliable way to force a client to do something. Period. And
trying to force it will likely have unintended consequences.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #6

P: n/a
In article <op**************@news.individual.net>,
Neal <ne*****@yahoo.com> writes:
If I left-clicked a link and a box came up instead of normal browser
operation, I'd become confused and likely run away.


Confused?

Seems perfectly straightforward: "this candidate has f***ed up his/her
resumé - on to the next one".

--
Nick Kew
Jul 20 '05 #7

P: n/a
Curious Angel <by*******@usa.net> wrote in
news:MP************************@news.intergate.com :
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT
clicks the link to force the file to be saved, and in any event _not_
opened.


You are using the F-word again.

You can trick IE to ask the user to save the document if it is delivered
with a HTTP header such as Content-Type: application/octet-stream

But even then you can't force anything.

--
In a room with thirty-seven people, never have everybody shake each other's
hand.
Jul 20 '05 #8

P: n/a
ni**@hugin.webthing.com (Nick Kew) wrote in news:6gpnu1-0a1.ln1
@webthing.com:
resumé


If you're going to retain one of the accents of résumé, why not do it with
both? :-P
Jul 20 '05 #9

P: n/a
Curious Angel <by*******@usa.net> wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to
force the file to be saved, and in any event _not_ opened.

Since the PDF will be in his cache in any event, I would just as soon place the
employer in control of what directory he wishes to save it in, and there are two
salient reasons for this:
1. I want him to OWN the document
2. I want him to FIND the document, quickly, on his hard drive
In any event I don't want it buried in his cache and so easily abandoned.


Umm--isn't it up to him if he wants to refer to your resume? Would you
like to put something in it to prevent him from ever deleting it from
his hard drive? Why would he hire someone who thinks he should be
prevented from viewing documents as he pleases? Why don't you just go
in with a gun and force him to give you a job?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #10

P: n/a
Curious Angel wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to
force the file to be saved, and in any event _not_ opened.

Quite the control freak, eh? Telling prospective employers right up
front how things will be.
You could look into (gasp!) Javascript. It allows all sorts of unusual
things to be programmed by the author (onclick).
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 20 '05 #11

P: n/a
Curious Angel wrote:

[...] and a quick search on GOOGLE reveals hundreds of
other people who want this kind of control, as well. But I'm glad you made this
comment, because we can now dispense with that wing of the party LOL.
LOL = Lots Of Luck. I don't get the context here.
(Lying Out Loud? Lips On Lips? Loss Of Light?)
Now for the legions of us who, for better or worse, want this option, any thoughts on

Legions? A few hundred disgruntled authors versus millions of users who
already know how it works. Hmm...

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 20 '05 #12

P: n/a
"Curious Angel" <by*******@usa.net> wrote in
comp.infosystems.www.authoring.html:
That is not what I want him to have, and a quick search on GOOGLE reveals hundreds of
other people who want this kind of control, as well.


To quote Sir Humphrey:

With respect, you are [pause] _they_ are wrong.

And in particular, when you're selling your services to prospective
employers, you need to lose the idea that you can control
_anything_.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #13

P: n/a
In article <E-********************@giganews.com>, jm***************@sohnen-moe.com
says...
Quite the control freak, eh? Telling prospective employers right up
front how things will be.

You could look into (gasp!) Javascript. It allows all sorts of unusual
things to be programmed by the author (onclick).


OMG! Intelligent life! "Control Freak" doesn't even begin to describe it. I pity
any employer who hires me. But enough about my career change . . .

Yes I contemplated Javascript, but it appears that legions have tread this path
before me . . . and programmed their "FORCE A SAVE-AS" (or DOWNLOAD, as the case may
be) in PHP.

And still others have gotten nasty, daring "Content-Type: application/octet-stream"
to trick Microsoft into doing what it knows not (downloading a PDF as opposed to
opening it in the browser).

I'm somewhat comfortable with PHP myself (having produced a graphics-based page
counter in it) so I guess I'll noodle around with one of the many PHP snippets I've
found.

Angel
Jul 20 '05 #14

P: n/a
In article <Xn**************************@130.133.1.4>,
Sam Hughes <hu****@rpi.edu> writes:
If you're going to retain one of the accents of résumé, why not do it with
both? :-P


Bah. I should stick to English and spell it Curriculum Vitae. Who needs
fancy americanisms?

--
Nick Kew
Jul 20 '05 #15

P: n/a
On Tue, 10 Aug 2004 12:58:51 -0700, Curious Angel <by*******@usa.net>
wrote:
In article <op**************@news.individual.net>, ne*****@yahoo.com
says...
Let the poor employer handle it as he normally
would. If he wants to save it he can right-click.


That is not what I want him to have, and a quick search on GOOGLE
reveals hundreds of
other people who want this kind of control, as well.


He's not looking to hire THEM.

I give up. With this attitude, you'll never get a job. This is about YOU
and an EMPLOYER. You want to show the employer that you can make things
difficult for him, you won't even get a rejection note.

This is your CAREER we're talking about. No HTML trick is as important as
that. Make it as easy as possible for the web-ignorant but job-offering
executive to hire you.
Jul 20 '05 #16

P: n/a
Tim
On Tue, 10 Aug 2004 12:43:16 -0700,
Curious Angel <by*******@usa.net> posted:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to
force the file to be saved, and in any event _not_ opened.
*Can't* be done. You can't force anything, and many suggestions will be
ignored, too.
I so badly don't want to have to zip this file, but I will as a last resort.


So, you hope that they can handle Zip files do you? And can handle a PDF
file in a Zip? You want to make it doubly difficult for them. Are you
even sure that they can handle PDF files? Or the version of PDF that
you're using?

The quick answer is to make it VERY clear that a link leads to a PDF file,
so that they can decide whether they're just going to click on a link, or
whatever they normally prefer to do with PDF files (which might be click on
it, or might be save it, or bookmark it, or whatever they prefer).

I would think, that by now, most people have had to deal with PDF files on
the web and have got used to dealing with them, or being annoyed by them.
Personally, I find them a damn pain, anywhere (on the web or as a file),
and would much rather view HTML. It's quick, simple, and safer.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #17

P: n/a
CJM
The only reasonable solution I can think of is to use something like ASP to
stream the file to the client.
http://www.darkfalz.com/Scripts_Details.aspx?pstID=1098

They will be presented with an Open/Save/Cancel/More Info dialog box. If
they want to open it, then can. If they want to save it, they can.

I agree with most here that you cant and shouldnt force anything. Can you
imagine the harm we could do, if we had that much control over our visitors
machines??

However, I do not agree with the assumption that they could save it if they
wanted to. The vast majority dont know about Rt-Click/Save Target As or
other browsers' equivalents.

I think you should provide both a view and a download link, and leave it to
the employer to choose.

CJM
Jul 20 '05 #18

P: n/a
Curious Angel <by*******@usa.net> wrote in
news:MP************************@news.intergate.com :

(Regarding getting a PDF file to open the file download dialog rather
than open in the browser)

I'm somewhat comfortable with PHP myself (having produced a
graphics-based page counter in it) so I guess I'll noodle around
with one of the many PHP snippets I've found.

Angel

With the understanding that it's ultimately the browser's and user's
choice what to do with anything coming down the pipe, if you've got
control of the HTTP headers, you can suggest this with:

Content-type: application/pdf
Content-disposition: attachment; filename=best-resume-ever.pdf
(No, you can't force the filename, nor the directory to save it in.)
Thomas Dowling
Ohio Library and Information Network
td******@ohiolink.edu
Jul 20 '05 #19

P: n/a
In our last episode,
<MP************************@news.intergate.com>,
the lovely and talented Curious Angel
broadcast on comp.infosystems.www.authoring.html:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT
clicks the link to force the file to be saved, and in any event
_not_ opened.


It's little wonder you are looking for a job. It may be a long time
before you find a boss who is happy to be tooled around.

--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 20 '05 #20

P: n/a
"Sam Hughes" <hu****@rpi.edu> a écrit dans le message de
news:Xn**************************@130.133.1.4
You can trick IE to ask the user to save the document if it is
delivered with a HTTP header such as Content-Type:
application/octet-stream


IE or other browsers... And you should use the attachment option instead,
with the correct mime type. See for exemple
http://support.microsoft.com/?id=260519
Each browser, each configuration could react differently with this, but at
least you can expect most browsers to do what you want : launch a download.

Jul 20 '05 #21

P: n/a
Hmm, CV looks like Latin to me, not English! (Of course "résumé" appears
to be French...)
Nick Kew<ni**@hugin.webthing.com> 8/10/2004 4:34:11 PM >>>
In article <Xn**************************@130.133.1.4>,
Sam Hughes <hu****@rpi.edu> writes:
If you're going to retain one of the accents of résumé, why not do it with both? :-P


Bah. I should stick to English and spell it Curriculum Vitae. Who needs
fancy americanisms?

--
Nick Kew
Jul 20 '05 #22

P: n/a
On Wed, 11 Aug 2004, Frank Swarbrick blurted out atop an
inappropriately formatted fullquote from Nick Kew:
Hmm, CV looks like Latin to me, not English! (Of course "résumé" appears
to be French...)


Your irony detector is in serious need of servicing!

Jul 20 '05 #23

P: n/a
Tim
Nick Kew<ni**@hugin.webthing.com> might have written this, but the
attribution was unfathomable:
Bah. I should stick to English and spell it Curriculum Vitae. Who needs
fancy americanisms?


"Frank Swarbrick" <Fr*************@efirstbank.com> posted:
Hmm, CV looks like Latin to me, not English!


Since the English adopt many words, including Latin, would that mean that
"Curriculum Vitae" are *also* considered to be English words? ;-)

I was reading something about how the English do that, and how certain
Latin words were considered to be part of the English language, which would
seem to suggest that they're now also English words, when another thought
occurred to me: The English alphabet is said to be the 26 letters from A
to Z, yet it includes words like encyclopaedia using the proper ae
character, so it seems that definition of the alphabet is also wrong. And,
therefor, US-ASCII is inadequate for the Queen's English. ;-)

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #24

P: n/a
In article <Xn*********************************@192.232.20.5> , td******@ohiolink.edu
says...
With the understanding that it's ultimately the browser's and user's
choice what to do with anything coming down the pipe, if you've got
control of the HTTP headers, you can suggest this with:

Content-type: application/pdf
Content-disposition: attachment; filename=best-resume-ever.pdf

(No, you can't force the filename, nor the directory to save it in.)
Thomas Dowling
Ohio Library and Information Network
td******@ohiolink.edu

Thomas, I am almost certain I _don't_ have control over those headers. The page
isn't on a server I own, and absent some means of incorporating the instruction
directly into a file(s) that I can upload, I don't think I can do this.

I am presuming that the "Content-~~" strings you are referring to would go
(somewhere) on the server? By the way, where DO they go? Just curious.

Angel
Jul 20 '05 #25

P: n/a
Actually I was just kidding around as well.
Alan J. Flavell<fl*****@ph.gla.ac.uk> 8/11/2004 4:14:04 PM >>>
On Wed, 11 Aug 2004, Frank Swarbrick blurted out atop an
inappropriately formatted fullquote from Nick Kew:
Hmm, CV looks like Latin to me, not English! (Of course "résumé" appears to be French...)


Your irony detector is in serious need of servicing!
Jul 20 '05 #26

P: n/a
In article <sl*********************@goodwill.io.com>, ei*****@io.com says...
It's little wonder you are looking for a job. It may be a long time
before you find a boss who is happy to be tooled around.

Honey, it was 20 years ago when I last submitted to the lash. You may not care for
my attitude but give me credit for, at the very least, being brutally FRANK. I can
be so here; I think we can all agree I will _not_ have that liberty whence I am again
.. . .

ENSLAVED

Yes, well . . .
Jul 20 '05 #27

P: n/a
Curious Angel <by*******@usa.net> wrote:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks
the link to
force the file to be saved, and in any event _not_ opened.
See http://www.htmlhelp.com/faq/html/med...force-download
2. I want him to FIND the document, quickly, on his hard drive
Why can't he find the document, quickly, on your web site?

For that matter, why can't he view the document, quickly, in his browser,
or in his browser's helper app?
I so badly don't want to have to zip this file, but I will as a last resort.


Not all users can handle zip archives easily. And not all browsers are
configured to save zip archives to the filesystem.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"It said 'Insert disk #3', but only two will fit..."
Jul 20 '05 #28

This discussion thread is closed

Replies have been disabled for this discussion.