Skip to content

W32: Ensure paper size/orientation is preserved

LRN requested to merge lrn/gtk:324-print-paper into gtk-3-24

Use existing create_page_setup() function to make a GtkPageSetup object out of the GtkPrintSettings (which we shuttled out of W32 DEVMODE) and apply it to GtkPrintOperation as the default page setup.

Applications (such as gedit) retrieve page setup from GtkPrintOperation by calling gtk_print_operation_get_default_page_setup (). Therefore, we have to set it, otherwise they will get the same page setup that we had before the dialog was shown, and will later feed that page setup to us again, which will cause paper size and orientation to be always reset back to whatever the hardcoded default values were.

Edited by LRN

Merge request reports