Improve PDF generation with proper A4 sizing and borders
- Move PDF border size to settings.py - Use standard A4 dimensions (210x297mm) - Fix aspect ratio preservation in layout function - Use img2pdf's built-in layout function with proper border specification
This commit is contained in:
@@ -23,6 +23,9 @@ DEFAULT_PARALLEL_PROCESSES = max(1, multiprocessing.cpu_count() - 1)
|
||||
# Can be overridden by environment variable
|
||||
PARALLEL_PROCESSES = int(os.getenv('NOTES_CLEANER_PARALLEL_PROCESSES', DEFAULT_PARALLEL_PROCESSES))
|
||||
|
||||
# Border size in pixels for the final PDF output
|
||||
PDF_BORDER_SIZE = 50
|
||||
|
||||
# Optimization settings
|
||||
OPTIPNG_OPTIMIZATION_LEVEL = int(os.getenv('NOTES_CLEANER_OPTIPNG_LEVEL', '7')) # 0-7, higher = better compression but slower
|
||||
TRIM_PADDING_PIXELS = int(os.getenv('NOTES_CLEANER_TRIM_PADDING', '20')) # Padding around content after trimming
|
||||
|
||||
Reference in New Issue
Block a user