diff -up ./shell/ev-application.c.orig ./shell/ev-application.c
--- ./shell/ev-application.c.orig	2009-05-25 13:32:55.716787633 +0100
+++ ./shell/ev-application.c	2009-05-25 13:33:04.246074997 +0100
@@ -46,7 +46,8 @@
 
 #include <string.h>
 
-static void ev_application_add_icon_path_for_screen (GdkScreen *screen);
+static void ev_application_add_icon_path_for_screen (GdkScreen     *screen);
+static void ev_application_save_print_settings      (EvApplication *application);
 
 struct _EvApplication {
 	GObject base_instance;
@@ -61,7 +62,8 @@ struct _EvApplication {
 
 	GtkPrintSettings *print_settings;
 #if GTK_CHECK_VERSION (2, 11, 0)
-	gchar            *print_settings_file;
+	GtkPageSetup     *page_setup;
+	GKeyFile         *print_settings_file;
 #endif
 };
 
@@ -73,6 +75,10 @@ G_DEFINE_TYPE (EvApplication, ev_applica
 
 #define APPLICATION_SERVICE_NAME "org.gnome.evince.ApplicationService"
 
+#define EV_PRINT_SETTINGS_FILE "print-settings"
+#define EV_PRINT_SETTINGS_GROUP "Print Settings"
+#define EV_PAGE_SETUP_GROUP "Page Setup"
+
 #ifdef ENABLE_DBUS
 gboolean
 ev_application_register_service (EvApplication *application)
@@ -637,25 +643,20 @@ ev_application_shutdown (EvApplication *
 	}
 
 #if GTK_CHECK_VERSION (2, 11, 0)
+  	ev_application_save_print_settings (application);
 	if (application->print_settings_file) {
-		if (application->print_settings) {
-			GError *error = NULL;
-			
-			gtk_print_settings_to_file (application->print_settings,
-						    application->print_settings_file,
-						    &error);
-			if (error) {
-				g_warning (error->message);
-				g_error_free (error);
-			}
-
-			g_object_unref (application->print_settings);
-			application->print_settings = NULL;
-		}
-
-		g_free (application->print_settings_file);
-		application->print_settings_file = NULL;
+ 		g_key_file_free (application->print_settings_file);
+ 		application->print_settings_file = NULL;
 	}
+ 	if (application->print_settings) {
+ 		g_object_unref (application->print_settings);
+ 		application->print_settings = NULL;
+ 	}
+ 
+ 	if (application->page_setup) {
+ 		g_object_unref (application->page_setup);
+ 		application->page_setup = NULL;
+  	}
 #else /* ! GTK 2.11.0 */
 	if (application->print_settings) {
 		g_object_unref (application->print_settings);
@@ -784,50 +785,143 @@ ev_application_screensaver_disable (EvAp
 		totem_scrsaver_disable (application->scr_saver);	
 }
 
-GtkPrintSettings *
-ev_application_get_print_settings (EvApplication *application)
+static GKeyFile *
+ev_application_get_print_settings_file (EvApplication *application)
 {
-	if (application->print_settings)
-		return application->print_settings;
+	gchar *filename;
 	
-#if GTK_CHECK_VERSION (2, 11, 0)
-	if (!application->print_settings_file) {
-		application->print_settings_file =
-			g_build_filename (ev_dot_dir (), "print-settings", NULL);
-	}
+	if (application->print_settings_file)
+		return application->print_settings_file;
 
-	if (g_file_test (application->print_settings_file, G_FILE_TEST_IS_REGULAR)) {
+	application->print_settings_file = g_key_file_new ();
+	
+	filename = g_build_filename (ev_dot_dir (), EV_PRINT_SETTINGS_FILE, NULL);
+	if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
 		GError *error = NULL;
-		
-		application->print_settings =
-			gtk_print_settings_new_from_file (application->print_settings_file, &error);
-		
+
+		g_key_file_load_from_file (application->print_settings_file,
+					   filename,
+					   G_KEY_FILE_KEEP_COMMENTS |
+					   G_KEY_FILE_KEEP_TRANSLATIONS,
+					   &error);
 		if (error) {
-			g_warning (error->message);
+			g_warning ("%s", error->message);
 			g_error_free (error);
-		} else {
-			return application->print_settings;
 		}
 	}
-#endif /* GTK 2.11.0 */
+	g_free (filename);
+
+	return application->print_settings_file;
+}
+
+static void
+ev_application_save_print_settings (EvApplication *application)
+{
+	GKeyFile *key_file;
+	gchar    *filename;
+	gchar    *data;
+	gssize    data_length;
+	GError   *error = NULL;
+
+	if (!application->print_settings && !application->page_setup)
+		return;
 	
-	application->print_settings = gtk_print_settings_new ();
+	key_file = ev_application_get_print_settings_file (application);
+	if (application->print_settings)
+		gtk_print_settings_to_key_file (application->print_settings,
+						key_file,
+						EV_PRINT_SETTINGS_GROUP);
+	if (application->page_setup)
+		gtk_page_setup_to_key_file (application->page_setup,
+					    key_file,
+					    EV_PAGE_SETUP_GROUP);
+	
+	filename = g_build_filename (ev_dot_dir (), EV_PRINT_SETTINGS_FILE, NULL);
+	data = g_key_file_to_data (key_file, (gsize *)&data_length, NULL);
+	g_file_set_contents (filename, data, data_length, &error);
+	if (error) {
+		g_warning ("%s", error->message);
+		g_error_free (error);
+	}
+	g_free (data);
+	g_free (filename);
+}
+
+GtkPrintSettings *
+ev_application_get_print_settings (EvApplication *application)
+{
+	GKeyFile         *key_file;
+	GtkPrintSettings *print_settings;
+	
+	if (application->print_settings)
+		return application->print_settings;
+
+	key_file = ev_application_get_print_settings_file (application);
+	print_settings = g_key_file_has_group (key_file, EV_PRINT_SETTINGS_GROUP) ? 
+		gtk_print_settings_new_from_key_file (key_file, EV_PRINT_SETTINGS_GROUP, NULL) :
+		gtk_print_settings_new ();
+
+	application->print_settings = print_settings ? print_settings : gtk_print_settings_new ();
 
 	return application->print_settings;
 }
 
+
 void
 ev_application_set_print_settings (EvApplication    *application,
 				   GtkPrintSettings *settings)
 {
+	GKeyFile *key_file;
+	
 	g_return_if_fail (GTK_IS_PRINT_SETTINGS (settings));
 	
 	if (settings == application->print_settings)
 		return;
 
+	key_file = ev_application_get_print_settings_file (application);
+	
 	if (application->print_settings)
 		g_object_unref (application->print_settings);
 	
 	application->print_settings = g_object_ref (settings);
+	gtk_print_settings_to_key_file (settings, key_file, EV_PRINT_SETTINGS_GROUP);
 }
 
+GtkPageSetup *
+ev_application_get_page_setup (EvApplication *application)
+{
+	GKeyFile     *key_file;
+	GtkPageSetup *page_setup;
+	
+	if (application->page_setup)
+		return application->page_setup;
+
+	key_file = ev_application_get_print_settings_file (application);
+	page_setup = g_key_file_has_group (key_file, EV_PAGE_SETUP_GROUP) ? 
+		gtk_page_setup_new_from_key_file (key_file, EV_PAGE_SETUP_GROUP, NULL) :
+		gtk_page_setup_new ();
+
+	application->page_setup = page_setup ? page_setup : gtk_page_setup_new ();
+
+	return application->page_setup;
+}
+
+void
+ev_application_set_page_setup (EvApplication *application,
+			       GtkPageSetup  *page_setup)
+{
+	GKeyFile *key_file;
+	
+	g_return_if_fail (GTK_IS_PAGE_SETUP (page_setup));
+	
+	if (page_setup == application->page_setup)
+		return;
+
+	key_file = ev_application_get_print_settings_file (application);
+	
+	if (application->page_setup)
+		g_object_unref (application->page_setup);
+	
+	application->page_setup = g_object_ref (page_setup);
+	gtk_page_setup_to_key_file (page_setup, key_file, EV_PAGE_SETUP_GROUP);
+}

diff -up ./shell/ev-application.h.orig ./shell/ev-application.h
--- ./shell/ev-application.h.orig	2009-05-25 13:32:55.719716254 +0100
+++ ./shell/ev-application.h	2009-05-25 13:33:44.683654926 +0100
@@ -30,6 +30,7 @@
 #include <glib/gerror.h>
 #include <glib-object.h>
 #include <gtk/gtkprintsettings.h>
+#include <gtk/gtkpagesetup.h>
 
 #include "ev-window.h"
 
@@ -89,6 +90,9 @@ void		  ev_application_screensaver_disab
 GtkPrintSettings *ev_application_get_print_settings  (EvApplication   *application);
 void              ev_application_set_print_settings  (EvApplication   *application,
 						      GtkPrintSettings *settings);
+GtkPageSetup     *ev_application_get_page_setup      (EvApplication   *application);
+void              ev_application_set_page_setup      (EvApplication   *application,
+						      GtkPageSetup    *page_setup);
 
 G_END_DECLS
 

diff -up ./shell/ev-window.c.orig ./shell/ev-window.c
--- ./shell/ev-window.c.orig	2009-05-25 13:32:55.722751660 +0100
+++ ./shell/ev-window.c	2009-05-25 13:35:51.040433223 +0100
@@ -205,7 +205,8 @@ static const gchar *document_print_setti
 	GTK_PRINT_SETTINGS_SCALE,
 	GTK_PRINT_SETTINGS_PRINT_PAGES,
 	GTK_PRINT_SETTINGS_PAGE_RANGES,
-	GTK_PRINT_SETTINGS_PAGE_SET
+	GTK_PRINT_SETTINGS_PAGE_SET,
+	GTK_PRINT_SETTINGS_OUTPUT_URI
 };
 
 static void	ev_window_update_actions	 	(EvWindow         *ev_window);
@@ -269,6 +270,8 @@ static void     find_bar_search_changed_
 							 EvWindow         *ev_window);
 static void     ev_window_do_preview_print              (EvWindow         *window);
 
+static void     ev_window_save_print_page_setup         (EvWindow         *window);
+
 G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
 
 static void
@@ -2030,30 +2033,6 @@ ev_window_cmd_save_as (GtkAction *action
 }
 
 static void
-ev_window_print_page_setup_done_cb (GtkPageSetup *page_setup,
-				    EvWindow     *window)
-{
-	/* Dialog was canceled */
-	if (!page_setup)
-		return;
-
-	if (window->priv->print_page_setup)
-		g_object_unref (window->priv->print_page_setup);
-	window->priv->print_page_setup = g_object_ref (page_setup);
-}
-
-static void
-ev_window_cmd_file_print_setup (GtkAction *action, EvWindow *ev_window)
-{
-	gtk_print_run_page_setup_dialog_async (
-		GTK_WINDOW (ev_window),
-		ev_window->priv->print_page_setup,
-		ev_window->priv->print_settings,
-		(GtkPageSetupDoneFunc) ev_window_print_page_setup_done_cb,
-		ev_window);
-}
-
-static void
 ev_window_clear_print_job (EvWindow *window)
 {
 	if (window->priv->print_job) {
@@ -2108,6 +2087,115 @@ ev_window_save_print_settings (EvWindow 
 }
 
 static void
+ev_window_save_print_page_setup (EvWindow *window)
+{
+	gchar        *uri = window->priv->uri;
+	GtkPageSetup *page_setup = window->priv->print_page_setup;
+
+	/* Save page setup options that are specific to the document */
+	ev_metadata_manager_set_int (uri, "page-setup-orientation",
+				     gtk_page_setup_get_orientation (page_setup));
+	ev_metadata_manager_set_double (uri, "page-setup-margin-top",
+					gtk_page_setup_get_top_margin (page_setup, GTK_UNIT_MM));
+	ev_metadata_manager_set_double (uri, "page-setup-margin-bottom",
+					gtk_page_setup_get_bottom_margin (page_setup, GTK_UNIT_MM));
+	ev_metadata_manager_set_double (uri, "page-setup-margin-left",
+					gtk_page_setup_get_left_margin (page_setup, GTK_UNIT_MM));
+	ev_metadata_manager_set_double (uri, "page-setup-margin-right",
+					gtk_page_setup_get_right_margin (page_setup, GTK_UNIT_MM));
+}
+
+static void
+ev_window_load_print_page_setup_from_metadata (EvWindow *window)
+{
+	gchar        *uri = window->priv->uri;
+	GtkPageSetup *page_setup = window->priv->print_page_setup;
+	GtkPaperSize *paper_size;
+	GValue        value = { 0, };
+
+	paper_size = gtk_page_setup_get_paper_size (page_setup);
+	
+	/* Load page setup options that are specific to the document */
+	if (ev_metadata_manager_get (uri, "page-setup-orientation", &value, TRUE)) {
+		gtk_page_setup_set_orientation (page_setup, g_value_get_int (&value));
+		g_value_unset (&value);
+	} else {
+		gtk_page_setup_set_orientation (page_setup, GTK_PAGE_ORIENTATION_PORTRAIT);
+	}
+	
+	if (ev_metadata_manager_get (uri, "page-setup-margin-top", &value, TRUE)) {
+		gtk_page_setup_set_top_margin (page_setup, g_value_get_double (&value), GTK_UNIT_MM);
+		g_value_unset (&value);
+	} else {
+		gtk_page_setup_set_top_margin (page_setup,
+					       gtk_paper_size_get_default_top_margin (paper_size, GTK_UNIT_MM),
+					       GTK_UNIT_MM);
+	}
+
+	if (ev_metadata_manager_get (uri, "page-setup-margin-bottom", &value, TRUE)) {
+		gtk_page_setup_set_bottom_margin (page_setup, g_value_get_double (&value), GTK_UNIT_MM);
+		g_value_unset (&value);
+	} else {
+		gtk_page_setup_set_bottom_margin (page_setup,
+						  gtk_paper_size_get_default_bottom_margin (paper_size, GTK_UNIT_MM),
+						  GTK_UNIT_MM);
+	}
+
+	if (ev_metadata_manager_get (uri, "page-setup-margin-left", &value, TRUE)) {
+		gtk_page_setup_set_left_margin (page_setup, g_value_get_double (&value), GTK_UNIT_MM);
+		g_value_unset (&value);
+	} else {
+		gtk_page_setup_set_left_margin (page_setup,
+						gtk_paper_size_get_default_left_margin (paper_size, GTK_UNIT_MM),
+						GTK_UNIT_MM);
+	}	
+
+	if (ev_metadata_manager_get (uri, "page-setup-margin-right", &value, TRUE)) {
+		gtk_page_setup_set_right_margin (page_setup, g_value_get_double (&value), GTK_UNIT_MM);
+		g_value_unset (&value);
+	} else {
+		gtk_page_setup_set_right_margin (page_setup,
+						 gtk_paper_size_get_default_right_margin (paper_size, GTK_UNIT_MM),
+						 GTK_UNIT_MM);
+	}	
+}
+
+static void
+ev_window_print_page_setup_done_cb (GtkPageSetup *page_setup,
+				    EvWindow     *window)
+{
+	/* Dialog was canceled */
+	if (!page_setup)
+		return;
+
+	if (window->priv->print_page_setup != page_setup) {
+		if (window->priv->print_page_setup)
+			g_object_unref (window->priv->print_page_setup);
+		window->priv->print_page_setup = g_object_ref (page_setup);
+	}
+	
+	ev_application_set_page_setup (EV_APP, page_setup);
+	ev_window_save_print_page_setup (window);
+}
+
+static void
+ev_window_cmd_file_print_setup (GtkAction *action, EvWindow *ev_window)
+{
+	if (!ev_window->priv->print_page_setup) {
+		ev_window->priv->print_page_setup = gtk_page_setup_copy (
+			ev_application_get_page_setup (EV_APP));
+		ev_window_load_print_page_setup_from_metadata (ev_window);
+	}
+	
+	gtk_print_run_page_setup_dialog_async (
+		GTK_WINDOW (ev_window),
+		ev_window->priv->print_page_setup,
+		ev_window->priv->print_settings,
+		(GtkPageSetupDoneFunc) ev_window_print_page_setup_done_cb,
+		ev_window);
+}
+
+static void
 ev_window_print_finished (GtkPrintJob *print_job,
 			  EvWindow    *window,
 			  GError      *error)
@@ -3287,7 +3375,6 @@ static void
 ev_window_do_preview_print (EvWindow *window)
 {
 	EvWindowPrivate  *priv = window->priv;
-	GtkPageSetup     *page_setup;
 	GtkPrintJob      *job;
 	gchar            *filename;
 	GError           *error = NULL;
@@ -3295,18 +3382,17 @@ ev_window_do_preview_print (EvWindow *wi
 	g_assert (priv->print_settings != NULL);
 	g_assert (priv->printer != NULL);
 
-	page_setup = gtk_page_setup_new ();
-
 	job = gtk_print_job_new ("evince-print",
 				 priv->printer,
 				 priv->print_settings,
-				 page_setup);
+				 priv->print_page_setup);
 
 	g_object_unref (priv->print_settings);
 	priv->print_settings = NULL;
+ 	g_object_unref (priv->print_page_setup);
+ 	priv->print_page_setup = NULL;
 	g_object_unref (priv->printer);
 	priv->printer = NULL;
-	g_object_unref (page_setup);
 
 	filename = g_filename_from_uri (priv->local_uri ?
 					priv->local_uri : priv->uri,
@@ -3331,22 +3417,41 @@ ev_window_cmd_preview_print (GtkAction *
 {
 	EvWindowPrivate *priv = window->priv;
 	GtkPrintSettings *print_settings = NULL;
+  	GtkPageSetup     *page_setup;
 #if GTK_CHECK_VERSION (2, 11, 0)
 	const gchar      *print_settings_file = priv->print_settings_file;
 
-	if (print_settings_file) {
-		if (g_file_test (print_settings_file, G_FILE_TEST_IS_REGULAR)) {
-			GError *error = NULL;
-
-			print_settings = gtk_print_settings_new_from_file (print_settings_file,
-									   &error);
+	if (print_settings_file && g_file_test (print_settings_file, G_FILE_TEST_IS_REGULAR)) {
+		GKeyFile *key_file;
+		GError   *error = NULL;
+
+		key_file = g_key_file_new ();
+		g_key_file_load_from_file (key_file,
+					   print_settings_file,
+					   G_KEY_FILE_KEEP_COMMENTS |
+					   G_KEY_FILE_KEEP_TRANSLATIONS,
+					   &error);
+		if (!error) {
+			print_settings =
+				gtk_print_settings_new_from_key_file (key_file,
+								      "Print Settings",
+								      NULL);
+			print_settings = print_settings ? print_settings : gtk_print_settings_new ();
 			
-			if (error) {
-				g_warning (error->message);
-				g_error_free (error);
-				print_settings = NULL;
-			}
+			page_setup = gtk_page_setup_new_from_key_file (key_file,
+								       "Page Setup",
+								       NULL);
+			page_setup = page_setup ? page_setup : gtk_page_setup_new ();
+		} else {
+			print_settings = gtk_print_settings_new ();
+			page_setup = gtk_page_setup_new ();
+			g_error_free (error);
 		}
+
+		g_key_file_free (key_file);
+	} else {
+		print_settings = gtk_print_settings_new ();
+		page_setup = gtk_page_setup_new ();
 	}
 #endif /* GTK 2.11.0 */
 	
@@ -3356,6 +3461,9 @@ ev_window_cmd_preview_print (GtkAction *
 	if (priv->print_settings)
 		g_object_unref (priv->print_settings);
 	priv->print_settings = print_settings;
+	if (priv->print_page_setup)
+		g_object_unref (priv->print_page_setup);
+	priv->print_page_setup = page_setup;
 
 	gtk_enumerate_printers ((GtkPrinterFunc) ev_window_enumerate_printer_cb,
 				window, NULL, FALSE);

