Unable to extract cover from pdf

Bug #1375983 reported by arspr on 2014-09-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I don't know if this a bug or some kind of problem inside the pdf. But nevertheless here you go.

Grab the attached file (or donwload it from: http://usa.canon.com/CUSA/assets/app/pdf/brochures/EOS_7D_Mark_II_AF_guide_CUSA_9-2014.pdf?WT.mc_id=C126149 )

Add it to Calibre.

Try to get the cover from it. (The "brown book" button in metadata dialogue)

You get the following error:
calibre, version 2.4.0
ERROR: Failed to render: Could not render this PDF file

But if you download the European version of that guide ( http://www.brochures.canon-europe.com/getFile.php?productid=9090&languageid=-1&categoryID=3839 ) it correctly works ????

arspr (arspr) wrote :

That PDF is password protected.

 status invalid

Changed in calibre:
status: New → Invalid
arspr (arspr) wrote :

Hi Kovid,

More info about this issue just in case there were a real bug in it.

Grab http://www.hec.usace.army.mil/software/hec-hms/documentation/HEC-HMS_QuickStart_Guide_4.0.pdf.

You'll see that this pdf is also a password protected pdf, but you CAN extract its cover.

Look at the attached screenshots which show permissions for the conflictive Canon.pdf and for this document. (They're in Spanish but I suppose you can easily follow them. You can also directly test both files in your own installation of Adobe Reader XI).

In fact HEC-HMS.pdf restrictions seem STRONGER than Canon.pdf but in two areas:
+Canon.pdf needs Adobe X or later. HEC-HMS.pdf only needs 7.0 or later.
+Canon.pdf uses 256bit AES encryption, while HEC-HMS.pdf only uses 128bit.

So I can see two possible scenarios:
+Everything is working as expected. The newest flavour of the Acrobat protection actually prevents and will always prevent Calibre from getting the cover.
+Calibre pdf cover extractor is OUTDATED. I mean there's nothing in the pdf which blocks the Cover extraction but an old version of the Calibre built-in pdf renderer which cannot handle that new Adobe X procedure or 256bit AES key. A "simple" (between quotes) update of this part of the software would allow the cover extraction without further problems.

(I'm posting this update because we have clearly detected that this conflictive Canon.pdf directly crashes and reboots Kobo eReaders or even Nitro PDF Viewer: http://www.mobileread.com/forums/showthread.php?p=2953686#post2953686).

arspr (arspr) wrote :
Kovid Goyal (kovid) wrote :

calibre contains no code to extract covers from PDF files, it uses the pdftoppm tool from the poppler project, I suggest you report the PDF file to them, to add support for the new PDF encryption.

arspr (arspr) wrote :


I've opened a but ticket in their bug-tracker: https://bugs.freedesktop.org/show_bug.cgi?id=85368

arspr (arspr) wrote :

Hi, Kovid

I've just received an automated email from pdftoppm/poppler bug-tracker system saying this bug will be fixed in next release.

You've got the link in the previous post.

Kovid Goyal (kovid) wrote :

Good it, will be a little while before the updated poppler makes it to calibre since I like to wait after new releases of dependencies before updating them to reduce the likelihood of critical bugs.

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

Other bug subscribers

Remote bug watches

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