PDF link forces download instead of open document

Discussion of general topics about Seamonkey
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

PDF link forces download instead of open document

Post by macamba »

A website I'm forced to use offers letters as pdf document. They might not want to pay for stamps and/or postage handling. When I click the link I do not get an open pdf document dialogue, but am forced to save the document locally. I then have to go to that location before I can open the document. When I complained about this procedure I got the answer that "this function differs per browser" and was invited to use a different browser...

I am not quite clear what has to happen behind the scenes to offer a pdf document from a database to the user, but forcing the user to another browser is a bit stiff in my opinion.

Anyone care to comment?
isaacschemm
Posts: 270
Joined: January 20th, 2015, 12:29 pm

Re: PDF link forces download instead of open document

Post by isaacschemm »

Do other PDFs open in the browser for you?
If not, I like to install pdf.js in SeaMonkey to open PDFs (it's built into Firefox) - the XPI is here.
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

Re: PDF link forces download instead of open document

Post by macamba »

libertyernie wrote:Do other PDFs open in the browser for you?
Yes. AFAIK that is not a problem. But I will look into your suggestion. Thanks.
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: PDF link forces download instead of open document

Post by therube »

A website
URL?

What does the same link do in other browsers?
(It could be something like the mime-type is incorrect, so you're not afforded the option to "open" & can only download.)
Last edited by therube on June 15th, 2016, 10:08 am, edited 1 time in total.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
isaacschemm
Posts: 270
Joined: January 20th, 2015, 12:29 pm

Re: PDF link forces download instead of open document

Post by isaacschemm »

therube wrote: What does the same link to in other browsers?
(It could be something like the mime-type is incorrect, so you're not afforded the option to "open" & can only download.)
In that case, the Open in Browser extension might help.
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

Re: PDF link forces download instead of open document

Post by macamba »

Thanks for the feedback, all. As suggested my therube I opened it in FireFox (dialogue defaulted to save, but with choice to open it in Acrobat Reader) and Edge (displayed box at the bottom with the choices 'Open', 'Open folder' and 'View Downloads'. At the moment I'm in discussion with the help desk of the site.

Other information, running Windows 10, latest patches installed (OS, SeaMonkey, etc).
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: PDF link forces download instead of open document

Post by therube »

the site
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

Re: PDF link forces download instead of open document

Post by macamba »

Looking at the website I found the following HTML code:

Code: Select all

<i class="fa fa-fw fa-download">
In my opinion this mean the developer of the website forces it users to save the document.
barbaz
Posts: 1504
Joined: October 1st, 2014, 3:25 pm

Re: PDF link forces download instead of open document

Post by barbaz »

macamba wrote:Looking at the website I found the following HTML code:

Code: Select all

<i class="fa fa-fw fa-download">
In my opinion this mean the developer of the website uses a Font Awesome based download icon for something.
User avatar
Andy Boze
Posts: 2755
Joined: June 30th, 2005, 9:53 pm
Location: South Bend, IN

Re: PDF link forces download instead of open document

Post by Andy Boze »

macamba wrote:In my opinion this mean the developer of the website forces it users to save the document.
Well, yes, but not because of the HTML code. Website owners get to decide how they want their content treated. The way they do this is by setting MIME types for various file types so that your web browser knows what to do with it. If a PDF file has its MIME type set to application/pdf, then the browser will open the PDF (if that's what you've configured your browser to do). If a PDF has its MIME type set to application/octet-stream, then your browser won't offer to do anything other than download the file. There are other MIME types that will force downloads, too. So, unless you can convince the website owner to change the MIME type to something you like better, you're stuck downloading the file, unless you want to try the extension that libertyernie mentioned.
But then again, I may be wrong.
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

Re: PDF link forces download instead of open document

Post by macamba »

Andy Boze wrote:..., unless you want to try the extension that libertyernie mentioned.
Alas,
Not available for SeaMonkey 2.40
I will forward the url to this discussion to the owner of the website. Thanks all.
User avatar
Andy Boze
Posts: 2755
Joined: June 30th, 2005, 9:53 pm
Location: South Bend, IN

Re: PDF link forces download instead of open document

Post by Andy Boze »

macamba wrote:Alas,
Not available for SeaMonkey 2.40
Did you try installing it?
Maximum officially supported SeaMonkey version for this add-on is 2.4a2. However, it is likely it will work fine also in newer SeaMonkey versions.
I'm using SM 2.45a1 and the extension installed fine for me.
But then again, I may be wrong.
macamba
Posts: 123
Joined: February 10th, 2005, 2:42 am

Re: PDF link forces download instead of open document

Post by macamba »

Andy Boze wrote:
macamba wrote:Alas,
Not available for SeaMonkey 2.40
Did you try installing it?
As a matter of fact, I just did. And when I went to the website, and clicked the download link, I still got the download dialogue.

It get's a bit ](*,)

The webmaster informed me (translated):
whether the message is displayed in the browser, rather than directly downloading, it is a setting of the corresponding browser.

The following images displays my settings. What should I change, if any?
Image

Edit: changed a typo
User avatar
Andy Boze
Posts: 2755
Joined: June 30th, 2005, 9:53 pm
Location: South Bend, IN

Re: PDF link forces download instead of open document

Post by Andy Boze »

macamba wrote:As a matter of fact, I just did. And when I went to the website, and clicked the download link, I still got the download dialogue.
Yes, but the extension should have added an option to the download dialog to let you open the file in your browser.
macamba wrote:The webmaster informed me (translated):
whether the message is displayed in the browser, rather than directly downloading, it is a setting of the corresponding browser.
Only sort of true. The browser is still responding to what the server directs it to do as a result of the MIME type chosen for the file. It would be a lot easier to diagnose this if you could give us the URL for the page in question. Is it something you have to log in to access?
macamba wrote:The following images displays my settings. What should I change, if any?
What are on the dropdowns beside application/force-download and application/json? I doubt it will help, but try clicking "Use other..." then select Adobe Reader.
But then again, I may be wrong.
User avatar
Andy Boze
Posts: 2755
Joined: June 30th, 2005, 9:53 pm
Location: South Bend, IN

Re: PDF link forces download instead of open document

Post by Andy Boze »

Try clicking this link http://www3.nd.edu/~fboze/pdftest/test.pdf. Do you get something the same as or different from the link you're having trouble with?
But then again, I may be wrong.
Post Reply