add legacy extract warning (#1433)

This commit is contained in:
Alex Xu
2026-09-03 21:52:27 -07:00
committed by GitHub
parent 38fa13610f
commit 3be76ec89f
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -892,6 +892,13 @@ def mupdf_pdf_process_pages_parallel(filename, output_dir, target_width, target_
cpu = cpu_count()
if not render:
print('PDF input can also use legacy extract option if you have any problems')
if GUI:
GUI.addMessage.emit('PDF input can also use legacy extract option if you have any problems'
, 'info', False)
GUI.addMessage.emit('', '', False)
# make vectors of arguments for the processes
vectors = [(i, cpu, filename, output_dir, target_width, target_height, pdfwidth) for i in range(cpu)]
print("Starting %i processes for '%s'." % (cpu, filename))
+2
View File
@@ -112,6 +112,8 @@ def splitImage(work):
imgProcess = imgEdges.point(lambda p: 255 if p > 6 else 0).convert('1', dither=Dither.NONE)
widthImg, heightImg = imgOrg.size
if widthImg < 300:
raise UserWarning('PDF render failed < 300 px. Try legacy extract option instead.')
if heightImg > opt.height:
if opt.debug:
drawImg = Image.open(filePath).convert(mode='RGBA')