I looked at the path fill example from the GTK demo app, and it seems that it uses PDF. This shouldn’t matter I guess when directly sending to a printer, but when sending to a file (“Print to file”), there are three options: PDF, Postscript, and SVG. However when I try picking SVG or PS, the resulting file is a still a PDF (without the .pdf suffix).
I cannot use GtkPrintOperation, because the existing logic that I need to work on is fully synchronous (essentially a for loop for every character in the document). GtkPrintUnixDialog seems to be the right choice, however GtkDialog is deprecated and I remember seeing a forum post that GtkPrintDialog is its replacement.