qpdfview does not open a file

Bug #1577501 reported by Thibaud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Invalid
Undecided
Unassigned

Bug Description

Step to reproduce:

1) Open the attached file with qpdfview
2) qpdfview show the message "could not open" (in command line, it says "Unknown file type: application/octet-stream" )
3) open the attached file with Evince: the file is displayed correctly.

Revision history for this message
Thibaud (thibolu) wrote :
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/

Changed in qpdfview:
status: New → Invalid
Revision history for this message
vanadium (ftack) wrote :

I am astonished why this issue is reported as invalid. This is a useability issue. Third PDF file I try to open already exhibits this issue. Evince opens it. Why should qpdf not be able to open it? Agreed, the PDF file is in error. To the end user, it is qpdf that does not work.

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

> Why should qpdf not be able to open it?

Because nobody spent the time to reimplement a more involved file detection logic for qpdfview specifically and hence the behavior of the application is bounded by what either libmagic's or Qt's MIME type detection enable. Until someone commits to implementing and maintaining that logic, this is out of scope for qpdfview.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.