Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Is a "ZIP" extension the ONLY way to force a "SAVE AS" for your PDF? Curious Angel 08-10-2004
Get Chitika Premium
Posted by Curious Angel on August 10, 2004, 1:43 pm
Please log in for more thread options
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


Posted by jmm-list-gn on August 10, 2004, 3:59 pm
Please log in for more thread options
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)


Posted by Curious Angel on August 10, 2004, 5:15 pm
Please log in for more thread options
jmm-list.AXSPAMGN@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


Posted by Thomas Dowling on August 11, 2004, 2:14 pm
Please log in for more thread options

(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
tdowling@ohiolink.edu


Posted by Curious Angel on August 12, 2004, 9:46 am
Please log in for more thread options
tdowling@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
> tdowling@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


Similar ThreadsPosted
Extra file extension in Save As dialog February 23, 2005, 4:00 am
Save your world November 25, 2005, 8:20 pm
Drop down select - extension July 26, 2004, 5:08 pm
Save me from FrontPage - what do you recommend? June 30, 2005, 12:58 pm
Mp3 to open save as dialog box December 16, 2005, 10:30 am
How to save vertical scroll postion and later set it November 10, 2006, 6:08 am
How to download/save a video clip? February 12, 2008, 8:02 pm
'TYPE' for is extended markup use -x March 16, 2006, 12:08 pm
Content-Disposition: "inline" vs. "extension-token" June 20, 2007, 12:50 pm
invoking ie/windows file save dialog July 15, 2004, 4:47 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap