1

In Chrome, when I enter a URL to a PDF file, usually the browser's Save dialog opens to save the PDF file to my hard disk, for example:

http://www.pdf995.com/samples/pdf.pdf

Now I have found a PDF URL where this, unfortunately, does not work:

https://formulare.bmf.gv.at/service/formulare/inter-Steuern/pdfd/2015/U1a.pdf

With this PDF URL, no Save dialog is opened and the binary text of this PDF is shown in the browser:

enter image description here

Why is this and how can I make it download automatically when I click the URL?

OS: Windows 7 x64 SP1

2 Answers 2

4

Why is this and how can I download this PDF file?

The website is broken and is not serving PDF files correctly. Contact [email protected].

Using the Firefox developer tools (press f12, select "Net", then select "All" we can see the response and request headers:

enter image description here

Content-Disposition inline;filename=U1a.pdf

The above tells the browser to serve the page content inline:

In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a Web page or as part of a Web page, or as an attachment, that is downloaded and saved locally.

You can open the PDF by saving the page locally and opening the PDF:

  1. Right click on the page and select "Save as" (or press ctrls)

    enter image description here

  2. Choose a directory and click "Save".

  3. Navigate to the chosen directory in Explorer.

  4. Double click U1a.pdf.

14
  • Thank you. How is the website not serving PDF files correctly? Can you please explain the technical details? Commented Nov 10, 2016 at 11:41
  • @user1580348 There are many different possibilities ...
    – DavidPostill
    Commented Nov 10, 2016 at 11:49
  • For example? Can you name some, please? Commented Nov 10, 2016 at 11:51
  • 2
    @user1580348 The most likely is that the web server is serving the wrong mime type for pdf files and is serving it as html. See Properly Configuring Server MIME Types
    – DavidPostill
    Commented Nov 10, 2016 at 11:54
  • IMO, this cannot be, as Firefox shows a correct MIME type for the PDF URL: http://i.imgur.com/iPoybDn.png (application/pdf). Commented Nov 10, 2016 at 12:31
0

the easiest way out here which is mention in this link is

  1. On your computer, open Chrome.
  2. Go to chrome://plugins.
  3. Under "Chrome PDF Viewer," click Enable PDF viewing.
9
  • Did you actually try this? It doesn't work. The website is not serving PDF files correctly. See my answer.
    – DavidPostill
    Commented Nov 10, 2016 at 11:33
  • Thank you. But I don't want to view the PDF in the browser, I just want to download the PDF when I click on the URL. Commented Nov 10, 2016 at 11:39
  • Strange: When I enter the PDF URL https://formulare.bmf.gv.at/service/formulare/inter-Steuern/pdfd/2015/U1a.pdf in Firefox, the PDF is displayed correctly as PDF in Firefox (without downloading). Commented Nov 10, 2016 at 11:50
  • Ok sorry I missunderstood. and did not read your question thoroughly.
    – Devidas
    Commented Nov 10, 2016 at 12:00
  • I have now activated Chrome PDF Viewer in chrome://plugins, but Chrome still displays the PDF as binary text. So why this (displaying the PDF in the browser) is working in Firefox and not in Chrome? Commented Nov 10, 2016 at 12:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .