mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
18f346d273
commit
5bd20e9efa
@ -174,16 +174,7 @@ class PDFWriter(QObject): # {{{
|
|||||||
if ok:
|
if ok:
|
||||||
item_path = os.path.join(self.tmp_path, '%i.pdf' % len(self.combine_queue))
|
item_path = os.path.join(self.tmp_path, '%i.pdf' % len(self.combine_queue))
|
||||||
self.logger.debug('\tRendering item %s as %i.pdf' % (os.path.basename(str(self.view.url().toLocalFile())), len(self.combine_queue)))
|
self.logger.debug('\tRendering item %s as %i.pdf' % (os.path.basename(str(self.view.url().toLocalFile())), len(self.combine_queue)))
|
||||||
if True:
|
self.do_paged_render(item_path)
|
||||||
self.do_paged_render(item_path)
|
|
||||||
else:
|
|
||||||
printer = get_pdf_printer(self.opts, output_file_name=item_path)
|
|
||||||
self.view.page().mainFrame().evaluateJavaScript('''
|
|
||||||
document.body.style.backgroundColor = "white";
|
|
||||||
|
|
||||||
''')
|
|
||||||
self.view.print_(printer)
|
|
||||||
printer.abort()
|
|
||||||
else:
|
else:
|
||||||
# The document is so corrupt that we can't render the page.
|
# The document is so corrupt that we can't render the page.
|
||||||
self.loop.exit(0)
|
self.loop.exit(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user