When you select "Print to File" in a Gnome print dialog (not cups-pdf):

... what is the actual command that gets executed? (I'm interested in the postscript variant, as on the image)
On the other hand - maybe there isn't a command call; maybe it is gtk_print_operation_set_export_filename from The new Gtk+ Printing API?
In any case - is there a way for me to utilize this particular code from the command line (not pdf2ps and the like)? Say, by using lpr to "print to file" to a postscript file - as if I was using the dialog above?