Cannot open PDF 1.7

Asked by monkeybrain2012

Hi, I have a PDF file that qpfview cannot open, the document's properties read

Producer :Acrobat Distiller 8.1.0 (Windows)

Format: PDF-1.7

Tried to open it with qpdfview (0.4.17 beta1 from ppa) produces an error that just says qpdfview cannot open the file, but evince opens it without issue. OS is Ubuntu 16.04 LTS, evince is stock install from the OS (hasn't been upgraded)

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
monkeybrain2012
Solved:
Last query:
Last reply:
Revision history for this message
Adam Reichold (adamreichold) said :
#1

Hello,

Since Evince and qpdfview use the same Poppler library behind the scenes, there should be no fundamental difference on which documents both applications can open. I rather guess that the file type detection is not working correctly in qpdfview but it is hard to know which the document in question. You could in any case try to launch qpdfview from a terminal to see if it outputs any more helpful error messages.

If you are using the PPA, you are also using a Qt4-based build, so libmagic is used to detect the file type. This means you can also try to run the "file" command on the document and see what it determines. It the result is not PDF, flatting the document using the "pdf2ps" and then "ps2pdf" commands might be a workaround.

Best regards, Adam.

Revision history for this message
monkeybrain2012 (kammon101) said :
#2

Hi,

The file command returns PDF document, version 1.7

Attempt (failed) to open with qpdfview in the terminal returns a bunch of failed to look ups

"Error: failed to look up (subsection.1.2.9)"
"Error: failed to look up (section.1.3)"
"Error: failed to look up (section.1.4)"
"Error: failed to look up (section*.3)"
"Error: failed to look up (section.6.1)"
"Error: failed to look up (section.6.2)"
"Error: failed to look up (subsection.6.2.1)"
"Error: failed to look up (subsection.6.2.2)"
"Error: failed to look up (section.6.3)"
"Error: failed to look up (section.6.4)"
"Error: failed to look up (subsection.6.4.1)"
"Error: failed to look up (subsection.6.4.2)"
"Error: failed to look up (subsection.6.4.3)"
"Error: failed to look up (subsection.6.4.4)"
"Error: failed to look up (subsection.6.4.5)"
"Error: failed to look up (section.6.5)"
"Error: failed to look up (section.6.6)"
"Error: failed to look up (section*.8)"
"Error: failed to look up (section.8.5)"
"Error: failed to look up (section.8.6)"
"Error: failed to look up (section.8.7)"
"Error: failed to look up (section.8.8)"
"Error: failed to look up (section.8.9)"
"Error: failed to look up (section.8.10)"
"Error: failed to look up (subsection.8.10.1)"
"Error: failed to look up (subsection.8.10.2)"
"Error: failed to look up (subsection.8.10.3)"
"Error: failed to look up (section.8.11)"
"Error: failed to look up (section*.10)"
"Error: Bad annotation destination"

The failed to look up subsections look perfectly normal in evince.

Revision history for this message
Adam Reichold (adamreichold) said :
#3

Hello again,

looks like my guess was wrong. The only Poppler code that Evince and qpdfview do not share is the Qt- resp. Gtk-frontend. Hence it would be most welcome if you could try to open the document with another Qt- and Poppler-based application like Okular. If that works, this begins to look like a bug in qpdfview's handling of outline information. But it still will be hard to debug this without the file in question at hand.

Best regards, Adam.

Revision history for this message
monkeybrain2012 (kammon101) said :
#4

Hi,

Okular works.

Here is a link to the file

https://www.dropbox.com/s/eupq0pmick9mphq/Pathria%2C%20Beale%20-%20Statistical%20Mechanics.pdf?dl=0

Please let me know once you get it so I can delete the file.

Thanks.

Revision history for this message
Adam Reichold (adamreichold) said :
#5

Hello again,

I had a look at the file and it indeed does not open but I see a different failure mode:

No page 721 was found in document at "Pathria, Beale - Statistical Mechanics.pdf"

Also pdf2ps fails on this file as Ghostscript gives up after an unrecoverable error. So it seems like the file is broken and while Evince and Okular are more lenient and still open it, qpdfview does not and I am quite reluctant to allow opening of such inconsistent documents as this would imply the need for much more consistency checking later in the code. Not sure what to do about this at the moment...

Just as a workaround, have you tried saving a copy of the file using Evince or Okular? Does the copy then open in qpdfview?

Best regards, Adam

Revision history for this message
monkeybrain2012 (kammon101) said :
#6

Hi,

The error is strange as there is page 721. Also Pdfview running in wine also opens it.

Save as from Okular and evince don't work (qpdfview doesn't open the saved copy) However, printing the file from evince (using cups-pdf) then qpdfview does open the printed copy. Not a fix but a workaround that works, so I will mark this as solved.

Thanks for looking into it.

Revision history for this message
monkeybrain2012 (kammon101) said :
#7

P.S. Print is not a perfect workaround, as internal links don't work anymore, but they worked in the original (in evince, e.g)