diff --git a/gtk/gtkprintsettings.h b/gtk/gtkprintsettings.h
index af35f3b..3e17480 100644
--- a/gtk/gtkprintsettings.h
+++ b/gtk/gtkprintsettings.h
@@ -136,6 +136,8 @@ void              gtk_print_settings_set_int                 (GtkPrintSettings
 #define GTK_PRINT_SETTINGS_RESOLUTION_X     "resolution-x"
 #define GTK_PRINT_SETTINGS_RESOLUTION_Y     "resolution-y"
 #define GTK_PRINT_SETTINGS_PRINTER_LPI      "printer-lpi"
+#define GTK_PRINT_SETTINGS_OUTPUT_DIR_URI   "output-dir-uri"
+#define GTK_PRINT_SETTINGS_OUTPUT_BASENAME  "output-basename"
 
 /**
  * GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT:
diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c
index 3322db1..05c9c28 100644
--- a/modules/printbackends/file/gtkprintbackendfile.c
+++ b/modules/printbackends/file/gtkprintbackendfile.c
@@ -215,13 +215,13 @@ output_file_from_settings (GtkPrintSettings *settings,
 			   const gchar      *default_format)
 {
   gchar *uri = NULL;
-  
+
   if (settings)
     uri = g_strdup (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_URI));
 
   if (uri == NULL)
     { 
-      const gchar *extension;
+      const gchar *extension, *basename, *uri_dir;
       gchar *name, *locale_name, *path;
 
       if (default_format)
@@ -245,9 +245,13 @@ output_file_from_settings (GtkPrintSettings *settings,
                 break;
             }
         }
- 
-      /* default filename used for print-to-file */ 
-      name = g_strdup_printf (_("output.%s"), extension);
+
+      basename = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_BASENAME);
+      if (basename == NULL)
+        basename = _("output");
+
+      name = g_strdup_printf ("%s.%s", basename, extension);
+
       locale_name = g_filename_from_utf8 (name, -1, NULL, NULL, NULL);
       g_free (name);
 
