mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 08:14:36 +01: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
1 changed files with 1 additions and 2 deletions
|
|
@ -443,7 +443,6 @@ def dump(self, items, out_stream, pdf_metadata):
|
|||
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 @@ def dump(self, items, out_stream, pdf_metadata):
|
|||
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…
Reference in a new issue