feat: Add input file existence check in PDF compression service and create test tools script

This commit is contained in:
Your Name
2026-03-19 15:13:04 +02:00
parent b09fe890d8
commit 5fb41b472a
2 changed files with 195 additions and 0 deletions

View File

@@ -59,6 +59,9 @@ def compress_pdf(
input_path,
]
if not os.path.exists(input_path):
raise PDFCompressionError(f"Input file not found: {input_path}")
try:
original_size = os.path.getsize(input_path)