Margin detection update

This commit is contained in:
sebastien committed 2026-10-30 12:34:37 +01:00
1 parent 2c9dc65640
commit b295f871a7
6 files changed
+292 -68

No files matched your search

+5 -1
View File
@@ -29,6 +29,7 @@ from copienator.filesystem import staged_files
from copienator.copy_errors import clear_copy_error, mark_copy_error, marked_copy_paths
from copienator.configuration import SHOW_PERSONAL_STEPS
from copienator.left_margin import analyse_margins
from copienator.name_grids import name_bottom_height_fraction
from copienator.annotation_layout import fingerprint
DELIMITER_WIDTH = 5
@@ -133,7 +134,10 @@ def process_single_pdf(
return None
reference_width = normal_page_width(pdf_path, images)
if automatic_margin and max_per_file != 1 and margin_analysis is None:
margin_analysis = analyse_margins(images, RENDER_DPI, reference_width)
name_bottom = name_bottom_height_fraction(
EvaluationWorkspace(pdf_path.parent.parent), pdf_path.stem)
margin_analysis = analyse_margins(
images, RENDER_DPI, reference_width, name_bottom_height_fraction=name_bottom)
full_width_pages = []
page_crops = []
for page_index, image in enumerate(images):