mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-02 13:05:33 +00:00
Chore: Import pikepdf and img2pdf lazily so startup does not load them
This commit is contained in:
1 parent
751b50b573
commit
7ee5442fe8
4 files changed
+25
-7
No files matched your search
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user