From d19a4754fa257fd584f894fabcf347df8b64940c Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 26 Mar 2026 08:09:25 -0700 Subject: [PATCH] if cropping, render pdf to 2x (#1276) --- kindlecomicconverter/comic2ebook.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 3f6fd44..f87f6b5 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -892,10 +892,10 @@ def getWorkFolder(afile, workdir=None): raise UserWarning("Failed to extract images from PDF file.") return workdir target_width, target_height = options.profileData[1] - if options.cropping == 1: - target_height = target_height + target_height*0.20 #Account for possible margin at the top and bottom - elif options.cropping == 2: - target_height = target_height + target_height*0.25 #Account for possible margin at the top and bottom with page number + #Account for possible margin at the top and bottom + if options.cropping: + target_width *= 2 + target_height *= 2 try: mupdf_pdf_process_pages_parallel(afile, fullPath, target_width, target_height) except Exception as e: