From 49172d645c265e3fd301ca15f75adb17c7337331 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 4 Oct 2007 10:43:05 +0000 Subject: [PATCH] Use poppler_page_render_for_printing() instead of poppler_page_render() if 2007-10-04 Carlos Garcia Campos * configure.ac: * backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_do_page): Use poppler_page_render_for_printing() instead of poppler_page_render() if available when exporting to a ps or pdf file. Fixes bug #476627. svn path=/trunk/; revision=2691 --- ChangeLog | 9 +++++++++ backend/pdf/ev-poppler.cc | 7 ++++++- configure.ac | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d49d050..aca41a98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-10-04 Carlos Garcia Campos + + * configure.ac: + * backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_do_page): + + Use poppler_page_render_for_printing() instead of + poppler_page_render() if available when exporting to a ps or pdf + file. Fixes bug #476627. + 2007-10-04 Carlos Garcia Campos * shell/ev-window.c: (ev_window_run_fullscreen): diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index fa669fa1..13be06f4 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1692,10 +1692,15 @@ pdf_document_file_exporter_do_page (EvFileExporter *exporter, x * (rotate ? pheight : pwidth), y * (rotate ? pwidth : pheight)); cairo_scale (ctx->cr, xscale, yscale); - + +#ifdef HAVE_POPPLER_PAGE_RENDER_FOR_PRINTING + poppler_page_render_for_printing (poppler_page, ctx->cr); +#else #ifdef HAVE_POPPLER_PAGE_RENDER poppler_page_render (poppler_page, ctx->cr); #endif +#endif + ctx->pages_printed++; if (ctx->pages_printed % ctx->pages_per_sheet == 0) { diff --git a/configure.ac b/configure.ac index ffb18bac..0874df2b 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,7 @@ if test "x$enable_pdf" = "xyes"; then evince_save_LIBS=$LIBS LIBS="$LIBS $FRONTEND_LIBS" AC_CHECK_FUNCS(poppler_page_render) + AC_CHECK_FUNCS(poppler_page_render_for_printing) LIBS=$evince_save_LIBS PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no) -- 2.43.5