mirror of
https://github.com/ciromattia/kcc
synced 2026-07-02 02:55:29 +00:00
if cropping, render pdf to 2x (#1276)
This commit is contained in:
@@ -892,10 +892,10 @@ def getWorkFolder(afile, workdir=None):
|
|||||||
raise UserWarning("Failed to extract images from PDF file.")
|
raise UserWarning("Failed to extract images from PDF file.")
|
||||||
return workdir
|
return workdir
|
||||||
target_width, target_height = options.profileData[1]
|
target_width, target_height = options.profileData[1]
|
||||||
if options.cropping == 1:
|
#Account for possible margin at the top and bottom
|
||||||
target_height = target_height + target_height*0.20 #Account for possible margin at the top and bottom
|
if options.cropping:
|
||||||
elif options.cropping == 2:
|
target_width *= 2
|
||||||
target_height = target_height + target_height*0.25 #Account for possible margin at the top and bottom with page number
|
target_height *= 2
|
||||||
try:
|
try:
|
||||||
mupdf_pdf_process_pages_parallel(afile, fullPath, target_width, target_height)
|
mupdf_pdf_process_pages_parallel(afile, fullPath, target_width, target_height)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user