Some things:
rastertopclx falls apart on sRGB raster
pdftoraster is slow as hell, use mupdftoraster or pdf2printable from ppm2pwg instead
Use the CUPS PPD compiler instead of writing your own
Ghostscript is slow as fuck
A lot of printers have weird PJL commands they want to just work nostr:note1t3n8dma7yhjvkqevacc2dsxtda94u2fue6557eagrm0ange5lthqzj8ct5