Use the correct technique for getting the current y offset for checking if text is in the header/footer

This commit is contained in:
Kovid Goyal 2016-08-10 15:44:31 +05:30
parent b076795404
commit 69d311033e

View File

@ -285,8 +285,8 @@ class PdfEngine(QPaintEngine):
last_x, last_y = x, y
if not self.content_written_to_current_page:
painter_top = self.painter().clipPath().boundingRect().y()
ypositions = [y - painter_top for x, y in gi.positions]
dy = self.graphics.current_state.transform.dy()
ypositions = [y + dy 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