Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report a more informative error message for encrypted PDFs #640

Open
bitsgalore opened this issue Aug 26, 2020 · 5 comments
Open

Report a more informative error message for encrypted PDFs #640

bitsgalore opened this issue Aug 26, 2020 · 5 comments
Assignees
Labels
feature New functionality to be developed P1 High priority issues to be scheduled in the upcoming release

Comments

@bitsgalore
Copy link
Member

bitsgalore commented Aug 26, 2020

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 bitsgalore changed the title Report more a informative error message for encrypted PDFs Report a more informative error message for encrypted PDFs Aug 26, 2020
@asciim0
Copy link
Contributor

asciim0 commented Aug 31, 2020

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

@BertrandCaron
Copy link

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.

@carlwilson carlwilson self-assigned this Jun 21, 2022
@carlwilson carlwilson added P1 High priority issues to be scheduled in the upcoming release feature New functionality to be developed labels Jun 21, 2022
@carlwilson carlwilson added this to the JHOVE 1.28 milestone Jun 21, 2022
@bitsgalore
Copy link
Member Author

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
Copy link
Member Author

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

@bitsgalore
Copy link
Member Author

bitsgalore commented May 31, 2023

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 bitsgalore reopened this May 31, 2023
@carlwilson carlwilson removed this from the JHOVE 1.28 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality to be developed P1 High priority issues to be scheduled in the upcoming release
Projects
Development

No branches or pull requests

4 participants