PDF Output: Fix a regression in 2.82 that caused conversion of comics to PDF files to have successive images become smaller and smaller in some circumstances. Fixes #1706814 [Private bug](https://bugs.launchpad.net/calibre/+bug/1706814)

This commit is contained in:
Kovid Goyal 2017-07-27 17:44:59 +05:30
parent 76c5cd230e
commit 076ca1fbb0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -443,7 +443,6 @@ class ImagePDFWriter(object):
tags=pdf_metadata.tags, mi=pdf_metadata.mi)
self.doc_title = pdf_metadata.title
self.doc_author = pdf_metadata.author
page_rect = QRect(*self.doc.full_page_rect)
for imgpath in items:
self.log.debug('Processing %s...' % imgpath)
@ -452,7 +451,7 @@ class ImagePDFWriter(object):
with lopen(imgpath, 'rb') as f:
if not p.loadFromData(f.read()):
raise ValueError('Could not read image from: {}'.format(imgpath))
draw_image_page(page_rect,
draw_image_page(QRect(*self.doc.full_page_rect),
self.painter, p,
preserve_aspect_ratio=True)
self.doc.end_page()