Open sergio-gdr opened 2 months ago
Some comments:
P.S. The encoding issue maybe isn’t too important as you’re filtering rasterised text already? Still the variety of dialects needs to be addressed somehow.
Thanks for looking at this.
1. This code hardcodes commands used by ZiJiang printers, which is just one of the ESC/POS dialects. With commands like cutting and even bitmaps, there’s a lot of differences between printers, and then there’s a separate Bixolon dialect, where a lot of commands are completely different. Probably you should have some constant arrays of different command dialects and switch between them depending on the printer model.
P.S. The encoding issue maybe isn’t too important as you’re filtering rasterised text already? Still the variety of dialects needs to be addressed somehow.
what commands in the code are specific to the ZiJiang dialect? the idea is to begin with a very bare-bones implementation, with just very basic commands that can be safely assumed to be the same for all vendors.
Thanks for the PR, contributing an ESC/POS printer driver is a good idea.
But are you aware of the New Architecture of printing? From CUPS 3.x on support for PPD files and driver filters will get removed. We will get all-IPP, only supporting driverless IPP printers, and for legacy/specialty printers which still need a driver, we will use a new format, the Printer Applications, emulations of driverless IPP printers which on their other end talk with the actual printer device (and do all needed conversion for that).
See this little introduction which I have written to introduce code contributors for OpenPrinting. Contains some videos and podcasts where Michael Sweet and me got interviewed and some short text about whet we are doing, especially the New Architecture ...
And for names of options and choices, Printer Applications talk IPP with the outside world and IPP has standardized names for nearly everything ...
You should have a look at the LPrint Printer Application from @michaelrsweet . It is for label printers which are very similar to POS printers (small format, low resolution, roll paper ...) and either use it as a base for your POS Printer Application or add POS printer support to LPrint ...
You should have a look at the LPrint Printer Application from @michaelrsweet . It is for label printers which are very similar to POS printers (small format, low resolution, roll paper ...) and either use it as a base for your POS Printer Application or add POS printer support to LPrint ...
I had previously been informed that lprint is the wrong place to add support for these sort of receipt printer devices, has that changed or is there a new project where one should work on adding support for these sort of devices?
@jameshilliard I am actually tracking the eventual addition of ESC/POS printers to LPrint now. I’m not sure how much functionality will be supported yet, but certainly the basics (printing, cutting) will be.
Hello. This PR adds a new filter to cups-filters. From the commit message:
I'm not sure how to handle the fact that different vendors have different ppd option names for things like cutting, paper feed, etc. What is the recommended way to handle these differences? should I just hardcode the ppd names for options that are known from the different vendors? (eg, Star uses "CutType" or "DocCutType", while Epson uses "TmxPaperCut, for the paper cut ppd option). Thank you.