Skip to content

Commit d19a475

Browse files
authored
if cropping, render pdf to 2x (ciromattia#1276)
1 parent 9a93cc4 commit d19a475

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kindlecomicconverter/comic2ebook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,10 @@ def getWorkFolder(afile, workdir=None):
892892
raise UserWarning("Failed to extract images from PDF file.")
893893
return workdir
894894
target_width, target_height = options.profileData[1]
895-
if options.cropping == 1:
896-
target_height = target_height + target_height*0.20 #Account for possible margin at the top and bottom
897-
elif options.cropping == 2:
898-
target_height = target_height + target_height*0.25 #Account for possible margin at the top and bottom with page number
895+
#Account for possible margin at the top and bottom
896+
if options.cropping:
897+
target_width *= 2
898+
target_height *= 2
899899
try:
900900
mupdf_pdf_process_pages_parallel(afile, fullPath, target_width, target_height)
901901
except Exception as e:

0 commit comments

Comments
 (0)