mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix printing of comics (cbz/cbr files) not working. Fixes #1774163 [cbr to pdf GUI conversion throws an error](https://bugs.launchpad.net/calibre/+bug/1774163)
This commit is contained in:
parent
4b6780a6c3
commit
bd7c8bba60
@ -158,9 +158,17 @@ class DoPrint(Thread):
|
||||
|
||||
|
||||
def do_print():
|
||||
from calibre.customize.ui import plugin_for_input_format
|
||||
data = cPickle.loads(sys.stdin.read())
|
||||
ext = data['input'].lower().rpartition('.')[-1]
|
||||
input_plugin = plugin_for_input_format(ext)
|
||||
args = ['ebook-convert', data['input'], data['output'], '--paper-size', data['paper_size'], '--pdf-add-toc',
|
||||
'--disable-remove-fake-margins', '--disable-font-rescaling', '--page-breaks-before', '/', '--chapter-mark', 'none', '-vv']
|
||||
'--disable-remove-fake-margins', '--chapter-mark', 'none', '-vv']
|
||||
if input_plugin.is_image_collection:
|
||||
args.append('--no-process')
|
||||
else:
|
||||
args.append('--disable-font-rescaling')
|
||||
args.append('--page-breaks-before=/')
|
||||
if data['page_numbers']:
|
||||
args.append('--pdf-page-numbers')
|
||||
for edge in 'left top right bottom'.split():
|
||||
|
Loading…
x
Reference in New Issue
Block a user