If yes, I heard they replaced the mature “cups” printing backend with a new one called “cpdb” which seems to lack a lot of features, at least for some printers. In that case better ask on an Ubuntu forum how to deal with that, and if not fixable if it’s possible to use the “cups” backend again.
FWIW, I’ve tried the example which uses GtkPrintOperation and It works perfectly, It manages to print just the exact height of paper needed for the entered text, so I guess that if you want complete control on printing you have to take the GtkPrintOperation road.