mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Fix a regression that caused the last page of a chapter to sometimes be dropped from the output
This commit is contained in:
parent
c7c1b175f3
commit
15cf137793
@ -285,7 +285,8 @@ class PdfEngine(QPaintEngine):
|
||||
last_x, last_y = x, y
|
||||
|
||||
if not self.content_written_to_current_page:
|
||||
ypositions = [y for x, y in gi.positions]
|
||||
painter_top = self.painter().clipPath().boundingRect().y()
|
||||
ypositions = [y - painter_top for x, y in gi.positions]
|
||||
miny = min(ypositions or (0,))
|
||||
maxy = max(ypositions or (self.pixel_height,))
|
||||
page_top = self.header_height if self.has_headers else 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user