Skip to content

Commit

Permalink
Suppress missing jbig2dec warning message
Browse files Browse the repository at this point in the history
Windows users can't resolve it easily.
  • Loading branch information
jbarlow83 committed Jul 22, 2024
1 parent 5256e74 commit 46b49cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ocrmypdf/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ def check_pdf(input_file: Path) -> bool:
return False
else:
with pdf:
messages = pdf.check()
with warnings.catch_warnings():
warnings.filterwarnings('ignore', message=r'pikepdf.*JBIG2.*')
messages = pdf.check()
success = True
for msg in messages:
if 'error' in msg.lower():
Expand Down

0 comments on commit 46b49cc

Please sign in to comment.