evince r2975 - in trunk: . backend/pdf



Author: carlosgc
Date: Sat Mar 22 15:22:04 2008
New Revision: 2975
URL: http://svn.gnome.org/viewvc/evince?rev=2975&view=rev

Log:
2008-03-22  Carlos Garcia Campos  <carlosgc gnome org>

	* backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_do_page):

	Fix printing in documents with rotated pages. Patch by Eugen
	Dedu. Fixes bug #512648.


Modified:
   trunk/ChangeLog
   trunk/backend/pdf/ev-poppler.cc

Modified: trunk/backend/pdf/ev-poppler.cc
==============================================================================
--- trunk/backend/pdf/ev-poppler.cc	(original)
+++ trunk/backend/pdf/ev-poppler.cc	Sat Mar 22 15:22:04 2008
@@ -1713,7 +1713,7 @@
 #ifdef HAVE_CAIRO_PRINT
 	gdouble  page_width, page_height;
 	gint     x, y;
-	gboolean rotate, landscape;
+	gboolean rotate;
 	gdouble  width, height;
 	gdouble  pwidth, pheight;
 	gdouble  xscale, yscale;
@@ -1734,8 +1734,6 @@
 		rotate = FALSE;
 	}
 
-	landscape = (ctx->paper_width > ctx->paper_height);
-
 	/* Use always portrait mode and rotate when necessary */
 	if (ctx->paper_width > ctx->paper_height) {
 		width = ctx->paper_height;
@@ -1787,7 +1785,7 @@
 	if (rotate) {
 		cairo_matrix_t matrix;
 		
-		cairo_translate (ctx->cr, width, 0);
+		cairo_translate (ctx->cr, (2 * y + 1) * pwidth, 0);
 		cairo_matrix_init (&matrix,
 				   0,  1,
 				   -1,  0,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]