diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
index 4a268b4..053d187 100644
--- a/libview/ev-print-operation.c
+++ b/libview/ev-print-operation.c
@@ -1857,6 +1857,7 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
 	gdouble           x_scale, y_scale;
         gdouble           x_offset, y_offset;
 	gdouble           top, bottom, left, right;
+	gboolean          landscape;
 
 	gtk_print_operation_set_defer_drawing (print->op);
 
@@ -1886,7 +1887,7 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
 		if (print->autorotate) {
                         x_offset = (cr_width - width) / 2;
                         y_offset = (cr_height - height) / 2;
-                        cairo_device_to_user (cr, &x_offset, &y_offset);
+                        cairo_device_to_user_distance (cr, &x_offset, &y_offset);
                         cairo_translate (cr, x_offset, y_offset);
                 }
 	} else {
@@ -1895,15 +1896,23 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
 		x_scale = (cr_width - left - right) / width;
 		y_scale = (cr_height - top - bottom) / height;
                 scale = MIN (x_scale, y_scale);
+		landscape = FALSE;
+		if (scale == y_scale)
+		        landscape = TRUE;
 
                 /* Ignore scale > 1 when shrinking to printable area */
                 if (scale > 1.0 && print->page_scale == EV_SCALE_SHRINK_TO_PRINTABLE_AREA)
                         scale = 1.0;
 
 		if (print->autorotate) {
-                        x_offset = (cr_width - scale * width) / 2;
-                        y_offset = (cr_height - scale * height) / 2;
-                        cairo_device_to_user (cr, &x_offset, &y_offset);
+		        if (landscape) {
+                                x_offset = (cr_height - scale * height) / 2;
+                                y_offset = (cr_width - scale * width) / 2;
+		        } else {
+		                x_offset = (cr_width - scale * width) / 2;
+		                y_offset = (cr_height - scale * height) / 2;
+		        }
+                        cairo_device_to_user_distance (cr, &x_offset, &y_offset);
                         cairo_translate (cr, x_offset, y_offset);
 
 			/* Ensure document page is within the margins. The
