Comment 2 for bug 1577501

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Thibaud,

thank you for taking the time to report this. Depending on the build environment, qpdfview will use Qt's built-in MIME type detection (based on the FDo shared MIME info database [1]) or uses libmagic to determine the file type. For the attached document, the file command (i.e. libmagic) will indeed report

> file --mime-type 424963.pdf
424963.pdf: application/octet-stream

which seems to be related to some amount of garbage at the beginning of the document, e.g.

> pdf2ps 424963.pdf
   **** Warning: File has some garbage before %PDF- .
> ps2pdf 424963.ps
> file --mime-type 424963.pdf
424963.pdf: application/pdf

will fix this and qpdfview will open the document.

[1] https://freedesktop.org/wiki/Software/shared-mime-info/