Download vs. browsing of a PDF document.

W

Wizard

Greetings all,

On a website I have added some links to download
some PDF documents.

If I (or someone else) browse the page and press the
link to download one of the PDF's, the desired PDF
opens in the browser if Adobe Acrobat or Acrobat
Reader is installed.

Is it possible to change something in the HTML to
"force" the PDF to be downloaded instead of being
opend in some brovser? (in the same way as if the link
was to e.g a ZIP file instead of a PDF)

Any help appreciated!

Wizard
 
T

Tom Pepper Willett

K

Kevin Spencer

You do know, don't you, that when you view the PDF file in the browser it is
already downloaded? Your users can simply use File|Save As... to save it
from their browser.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
W

Wizard

Thnx Tom,

I'm aware of that possibility - but I was hoping that it
was another way to solve the issue...

Wizard

Tom Pepper Willett said:
You'll need to put it in a zip file, or put a comment on the page to right
click and save as.
--
=====================================================
Tom Pepper Willett [Microsoft MVP - FrontPage]
-------------------------------------------------------------------------- --
-
Microsoft FrontPage:
http://www.microsoft.com/office/frontpage/prodinfo/default.mspx
http://msdn.microsoft.com/office/understanding/frontpage/
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
=====================================================
Wizard said:
Greetings all,

On a website I have added some links to download
some PDF documents.

If I (or someone else) browse the page and press the
link to download one of the PDF's, the desired PDF
opens in the browser if Adobe Acrobat or Acrobat
Reader is installed.

Is it possible to change something in the HTML to
"force" the PDF to be downloaded instead of being
opend in some brovser? (in the same way as if the link
was to e.g a ZIP file instead of a PDF)

Any help appreciated!

Wizard
 
W

Wizard

Thnx Kevin,

I know that it's already downloaded when it's opened in
the browser. The PDF's I'm talking about is 10mbyte ++
and while opening/downloading them the browser sort of
freezes - and thats what I was hoping to avoid.

I'll look into a solution with my FTP server instead.

Wizard
 
K

Kevin Spencer

Hi Wizard,

It is possible using server-side programming, such as ASP or ASP.Net.
However, you have to be somewhat proficient at server-side programming to do
it. Basically, on the server, you have an ASP or ASP.Net page that is what
you link to. The ASP or ASP.Net page opens the PDF file and reads it into a
binary stream. It then sets the Response.ContentType (MIME type) to the
proper MIME type ("application/octet-stream"), and writes the binary stream
to the Response's Output Stream (to the browser). This forces the browser to
act as if it doesn't know what the MIME type of the file is, and therefore,
it puts up a dialogue prompt for the user to open or save the file.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
W

Wizard

Kevin,

I appreciate the possible solution, but I'm afraid that is a
bit over my skills :~\ I was sort of hoping that I could put
in someting extra in the HTML kode to "force" the browser
to promt for the download instead of opening the PDF.

I guess I have to look into ASP and/or ASP.Net some day,
just not today...

Have a good one!

Wizard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top