diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c
index 3322db1..5d4c088 100644
--- a/modules/printbackends/file/gtkprintbackendfile.c
+++ b/modules/printbackends/file/gtkprintbackendfile.c
@@ -607,6 +607,9 @@ file_printer_output_file_format_changed (GtkPrinterOption    *format_option,
       gchar *tmp = g_strdup_printf ("%s.%s", base, format_option->value);
 
       gtk_printer_option_set (uri_option, tmp);
+      /* need to set uri again here as the change emitted by gtk_printer_option_set causes it to be lost */
+      g_free (uri_option->value);
+      uri_option->value = g_strdup (tmp);
       g_free (tmp);
       g_free (base);
     }
