GtkPrintOperation file name

How can I change the print file name in the Gtk print dialog?
To better understand my needs, in a GtkNotebook, every tab has a name identifier and can be printed out independently. I want to add the respective identifier in the print output file name (print to file, pdf.), the “~/Documents/output.pdf” in the attached capture.
I use the GtkPrintOperation API in C, linux.
I do not want to use gtk_print_operation_set_export_filename(), to keep the option of normal printing.

Thank you!

Use GtkPrintSettings to set the output file details:

gtk_print_settings_set (settings,
gtk_print_settings_set (settings,
gtk_print_settings_set (settings,

Great! Many thanks!
Sorry if I missed these items in the help pages, but I couldn’t find directly the keys for the gtk_print_settings_set() function.

They are part of the API reference, for instance:

You can search for “print settings output” in the documentation, for instance. They are also listed in the “constants” section of the main index.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.