Require recent pikepdf to fix check_pdf_syntax issue

This commit is contained in:
James R. Barlow
2025-10-29 11:40:51 -07:00
parent 38d60ea89b
commit abc2d41e2d
2 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -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",
+1 -4
View File
@@ -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():