diff --git a/document.c b/document.c index fb96f4d..40ee942 100644 --- a/document.c +++ b/document.c @@ -546,7 +546,7 @@ zathura_page_image_save(zathura_page_t* page, zathura_image_t* image, const char } bool -zathura_page_render(zathura_page_t* page, cairo_t* cairo) +zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing) { if (page == NULL || page->document == NULL || cairo == NULL) { return NULL; @@ -557,7 +557,7 @@ zathura_page_render(zathura_page_t* page, cairo_t* cairo) return NULL; } - return page->document->functions.page_render_cairo(page, cairo); + return page->document->functions.page_render_cairo(page, cairo, printing); } zathura_index_element_t* diff --git a/document.h b/document.h index 00dcc14..9ee6747 100644 --- a/document.h +++ b/document.h @@ -249,7 +249,7 @@ struct zathura_document_s /** * Renders the page */ - bool (*page_render_cairo)(zathura_page_t* page, cairo_t* cairo); + bool (*page_render_cairo)(zathura_page_t* page, cairo_t* cairo, bool printing); /** * Free page @@ -420,9 +420,10 @@ bool zathura_page_image_save(zathura_page_t* page, zathura_image_t* image, const * * @param page The page object * @param cairo Cairo object + * @param printing render for printing * @return True if no error occured, otherwise false */ -bool zathura_page_render(zathura_page_t* page, cairo_t* cairo); +bool zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing); /** * Create new index element diff --git a/print.c b/print.c index 9eb97f4..e6d683f 100644 --- a/print.c +++ b/print.c @@ -89,5 +89,5 @@ cb_print_draw_page(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext* return; } - zathura_page_render(page, cairo); + zathura_page_render(page, cairo, true); } diff --git a/render.c b/render.c index 86a62f1..3618fae 100644 --- a/render.c +++ b/render.c @@ -194,7 +194,7 @@ render(zathura_t* zathura, zathura_page_t* page) cairo_scale(cairo, zathura->document->scale, zathura->document->scale); } - if (zathura_page_render(page, cairo) == false) { + if (zathura_page_render(page, cairo, false) == false) { cairo_destroy(cairo); cairo_surface_destroy(surface); gdk_threads_leave();