Require recent pikepdf to fix check_pdf_syntax issue
This commit is contained in:
+2
-2
@@ -16,8 +16,8 @@ dependencies = [
|
||||
"img2pdf>=0.5",
|
||||
"packaging>=20",
|
||||
"pdfminer.six>=20220319",
|
||||
"pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break
|
||||
"pikepdf>=8.10.1,!=9.8.0",
|
||||
"pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break
|
||||
"pikepdf>=10",
|
||||
"Pillow>=10.0.1",
|
||||
"pluggy>=1",
|
||||
"rich>=13",
|
||||
|
||||
@@ -270,10 +270,7 @@ def check_pdf(input_file: Path) -> bool:
|
||||
with pdf:
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings('ignore', message=r'pikepdf.*JBIG2.*')
|
||||
if hasattr(pdf, 'check_pdf_syntax'):
|
||||
messages = pdf.check_pdf_syntax() # pikepdf >= 9.10.0
|
||||
else:
|
||||
messages = pdf.check()
|
||||
messages = pdf.check_pdf_syntax()
|
||||
success = True
|
||||
for msg in messages:
|
||||
if 'error' in msg.lower():
|
||||
|
||||
Reference in New Issue
Block a user