GNOME Bugzilla – Bug 344517
print settings always return NULL page size
Last modified: 2018-02-10 03:40:51 UTC
Steps: 0) Create unix print dialogue 1) Run it 2) Get GtkPrintSettings from it 3) gtk_print_settings_get_paper_size This will always return NULL, at least in my testing.
According to my reading of the code, paper size is only set in the print settings on win32. On unix, the print dialog does not have paper selection, since we have the separate page setup dialog, and thus the paper size is taken from the page setup. You should still be able to manually set a paper size in the print settings if you want, though.
Yes, normally you need layout information like page size ahead of printing. I do remember talking about taking the default (i.e. if not specified by the app) page setup from the selected printer though, so that you can print to the native printer page size in a more limited printing case with no page setup. We don't do this atm though.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.