Skip to content

Commit

Permalink
Use a fresh context for each pdf output page
Browse files Browse the repository at this point in the history
Otherwise, larger pages after smaller pages are clipped to
the smaller page's rectangle.
  • Loading branch information
fagu committed Mar 19, 2021
1 parent aa2f7cb commit 7e5afef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ void PDFExporter::save(Document* doc, const std::string& file_name) {
}
qDebug() << "Drawing mode:" << (simplistic ? "simplistic" : "general");
surface->set_size(UNIT_TO_POINT * page->width(), UNIT_TO_POINT * page->height());
CairoGroup cg(cr);
cr->rectangle(0, 0, page->width(), page->height());
cr->clip();
if (!simplistic) {
Expand Down

0 comments on commit 7e5afef

Please sign in to comment.