mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
76c5cd230e
commit
076ca1fbb0
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user