In case the printer driver is absolutely needed and the PDF services are not suitable.
The solution is to write your own CUPS driver - both Mac OS and Linux use CUPS for printing, so solution could work for both systems.
The documentation for CUPS provides an instruction on writing a driver (https://www.cups.org/doc/postscript-driver.html), which generally consists of creating:
- A "filter" program that converts the input to printer code and sends it to a printer.
- A PPD file that describes the printer (https://en.wikipedia.org/wiki/PostScript_Printer_Description)
There's a good tutorial on how to write one in python: https://behind.pretix.eu/2018/01/20/cups-driver/
and provides example open source for driving a FGL printer: https://github.com/pretix/cups-fgl-printers that can be adapted to your needs.