ID #1376

Why are PDF files held with the application/x-pdf content-type instead of application/pdf ?

Short answer: So we can bypass an error in the implementation of the Adope plugin in the Internet Explorer.
Long answer: The Internet Explorer - in combination with the Adobe plugin - has a problem with displaying PDF files. This may (under certain circumstances) lead to PDF documents not being displayed correctly, thus causing an opaque error.

 

So the message "File does not begin with %PDF-" often appears. And even worse: The Internet Explorer tries to request the PDF document not just once but thrice.

Microsoft itself has posted a link entry in the Knowledge-Base and pins the error on a bad server configuration.
This is however not quite correct. Actually the Internet Explorer resp. the Adobe plugin use a method that doesn't comply with the usual HTTP procedure used for handling files.
Whether the eror is caused by the Internet Explorer or the Adobe plugin isn't clear.

One approach to resolve this problem is to trick the plugin in the Internet Explorer so that the Adobe Reader installed on the systems is being used instead of the plugin. This can be achieved by changing the MIME type for the .pdf ending on the web server into something the plugin isn't familiar with. In this case for instance: application/x-pdf.

This solution works quite decently: other browsers are affected little or less. The only drawback with other browsers is that displaying the PDF document doesn't take place within the broswer window anymore.
Compared to the other effects the abovementioned error can have this is a negligible drawback.

Tags: PDF

Verwandte Artikel:

Kommentieren nicht möglich