jhove icon indicating copy to clipboard operation
jhove copied to clipboard

Report a more informative error message for encrypted PDFs

Open bitsgalore opened this issue 4 years ago • 2 comments

Jhove's output could be more informative for PDFs that use any kind of encryption. Currently JHOVE reports the following error message in this case (tested with Jhove 1.24.1, 2020-03-16):

ErrorMessage: Compression method is invalid or unknown to JHOVE

This is not particularly helpful, especially because it provides no clue whatsoever about encryption being the culprit. Perhaps the error message could be changed to something more informative that at least mentions the encryption?

Example files:

bitsgalore avatar Aug 26 '20 19:08 bitsgalore

I strongly support this and can supply quite a few real-life examples.

asciim0 avatar Aug 31 '20 05:08 asciim0

We recently ran into a similar problem, and our JHOVE users couldn't understand the problem because of the arbitrary message JHOVE returned. So I also support this issue.

BertrandCaron avatar Mar 18 '21 11:03 BertrandCaron

I just stumbled across this issue again. In addition to the confusing message itself, the fact hat JHOVE exits with an error (instead of parsing the file) also doesn't seem quite the right behavior (except for PDFs with an "open password", which cannot be parsed at all without a password). For all other cases (printing, copying and text access restrictions) other tools such as VeraPDF are perfectly capable of parsing PDFs with those restrictions. And since the PDF spec allows these restrictions, they shouldn't result in a "Not well-formed" validation outcome.

bitsgalore avatar May 03 '23 17:05 bitsgalore

Seems JHOVE 1.28 changes fixed this, so closing this issue now.

bitsgalore avatar May 30 '23 16:05 bitsgalore

Re-opening as JHOVE still reports this error for some PDFs with security-related features. Examples:

Additional check with VeraPDF confirms both files contain security features.

bitsgalore avatar May 31 '23 15:05 bitsgalore