After some further investigation it looks like the resolution is called something different for different models of printers and different ppd files. The upshot being I cannot script a resolution change for all of our printers. I will have to do it manually. Boo !