Chore: Import pikepdf and img2pdf lazily so startup does not load them

This commit is contained in:
Trenton H committed 2026-10-30 10:22:16 -07:00
1 parent 751b50b573
commit 7ee5442fe8
4 files changed
+25 -7

No files matched your search

+2 -1
View File
@@ -1,6 +1,5 @@
from pathlib import Path
import img2pdf
from PIL import Image
from documents.utils import copy_basic_file_stats
@@ -17,6 +16,8 @@ def convert_from_tiff_to_pdf(tiff_path: Path, target_directory: Path) -> Path:
Returns the path of the PDF created.
"""
import img2pdf
# override pixel setting if needed
maybe_override_pixel_limit()