Skip to content

Commit

Permalink
Fix plaintext printing >2 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
attah committed Apr 9, 2022
1 parent 5799985 commit 6e2ded8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/printerworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ try {

while(true)
{
painter.save();
painter.translate(body.left(), body.top() - p*body.height());
QRectF view(0, p*body.height(), body.width(), body.height());
painter.setClipRect(view);
Expand All @@ -462,6 +463,7 @@ try {
context.clip = view;
context.palette.setColor(QPalette::Text, Qt::black);
doc.documentLayout()->draw(&painter, context);
painter.restore();

p++;
pageCount++;
Expand Down

0 comments on commit 6e2ded8

Please sign in to comment.