]> www.fi.muni.cz Git - evince.git/commitdiff
Fix printing in documents with rotated pages. Patch by Eugen Dedu. Fixes
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 22 Mar 2008 15:22:04 +0000 (15:22 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sat, 22 Mar 2008 15:22:04 +0000 (15:22 +0000)
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.

svn path=/trunk/; revision=2975

ChangeLog
backend/pdf/ev-poppler.cc

index d5d1a13bcb2d96a68dbf2de4c2dca2bb59349975..57a15de3daa96c7f340bd76ff641e9519a6e04d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+       
 2008-03-19  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/pdf/ev-poppler.cc: (ev_link_dest_from_dest),
index 72c54c248c3256846c495afa6d3d033ac02e1178..c11d21203e0f059aaa67f86721763a5130fe41e0 100644 (file)
@@ -1713,7 +1713,7 @@ pdf_document_file_exporter_do_page (EvFileExporter  *exporter,
 #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 @@ pdf_document_file_exporter_do_page (EvFileExporter  *exporter,
                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 @@ pdf_document_file_exporter_do_page (EvFileExporter  *exporter,
        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,