Index: evince-3.4.0/libview/ev-print-operation.c
===================================================================
--- evince-3.4.0.orig/libview/ev-print-operation.c	2011-11-20 18:24:17.000000000 +0200
+++ evince-3.4.0/libview/ev-print-operation.c	2012-10-08 16:34:21.203533936 +0300
@@ -1775,6 +1775,37 @@
 }
 
 static void
+_print_context_get_effective_margins (GtkPrintContext *context,
+				 gdouble         *top,
+				 gdouble         *bottom,
+				 gdouble         *left,
+				 gdouble         *right)
+{
+	GtkPageSetup *setup = gtk_print_context_get_page_setup (context);
+	gdouble dpi_x = gtk_print_context_get_dpi_x (context),
+			dpi_y = gtk_print_context_get_dpi_y (context);
+	gdouble setup_top = dpi_y * gtk_page_setup_get_top_margin (setup, GTK_UNIT_INCH),
+			setup_bottom = dpi_y * gtk_page_setup_get_bottom_margin (setup, GTK_UNIT_INCH),
+			setup_left = dpi_x * gtk_page_setup_get_left_margin (setup, GTK_UNIT_INCH),
+			setup_right = dpi_x * gtk_page_setup_get_right_margin (setup, GTK_UNIT_INCH);
+
+	_print_context_get_hard_margins (context, top, bottom, left, right);
+
+    if (setup_top > *top) {
+		*top = setup_top;
+	}
+	if (setup_bottom > *bottom) {
+		*bottom = setup_bottom;
+	}
+	if (setup_left > *left) {
+		*left = setup_left;
+	}
+	if (setup_right > *right) {
+		*right = setup_right;
+	}
+}
+
+static void
 ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
 				    GtkPrintContext       *context,
 				    gint                   page)
@@ -1814,7 +1845,7 @@
 		if (print->autorotate)
 			cairo_translate (cr, (cr_width - width) / 2, (cr_height - height) / 2);
 	} else {
-		_print_context_get_hard_margins (context, &top, &bottom, &left, &right);
+		_print_context_get_effective_margins (context, &top, &bottom, &left, &right);
 
 		x_scale = (cr_width - left - right) / width;
 		y_scale = (cr_height - top - bottom) / height;
