mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:24:57 +02:00
Fix PDF output on OSX: Force the use of OSX's internal PDF engine instead of using Qt's.
This commit is contained in:
parent
5804d188d9
commit
f9a358f770
1 changed files with 3 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
from calibre import isosx
|
||||
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||
from calibre.ebooks.pdf.pageoptions import unit, paper_size, \
|
||||
orientation
|
||||
|
|
@ -164,6 +165,8 @@ def _render_html(self, ok):
|
|||
self.logger.debug('\tRendering item %s as %i.pdf' % (os.path.basename(str(self.view.url().toLocalFile())), len(self.combine_queue)))
|
||||
printer = get_pdf_printer(self.opts)
|
||||
printer.setOutputFileName(item_path)
|
||||
if isosx:
|
||||
printer.setOutputFormat(QPrinter.NativeFormat)
|
||||
self.view.print_(printer)
|
||||
printer.abort()
|
||||
self._render_book()
|
||||
|
|
|
|||
Loading…
Reference in a new issue