Skip to content

Commit

Permalink
fixed pdf export issue, issue #36
Browse files Browse the repository at this point in the history
  • Loading branch information
voldyman committed Feb 16, 2015
1 parent 5cd5ddb commit 8c39929
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Widgets/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ public class Window : Gtk.Window {

var op = new WebKit.PrintOperation (html_view);
var settings = new Gtk.PrintSettings ();
settings.set_printer (dgettext ("gtk30", "Print to File"));
settings[Gtk.PRINT_SETTINGS_PRINTER] = dgettext ("gtk30", "Print to File");

settings[Gtk.PRINT_SETTINGS_OUTPUT_URI] = "file://" + file.get_path ();
settings[Gtk.PRINT_SETTINGS_OUTPUT_FILE_FORMAT] = "pdf";
op.set_print_settings (settings);

op.print ();
Expand Down

0 comments on commit 8c39929

Please sign in to comment.