ESC/P2 was aimed at inkjets. Although there are only CMY and K colours to choose from, the set colour control code allows a value anyway of 0 (black), 1 (magenta), 2 (cyan), 3 (violet), 4 (yellow), 5 (red) and 6 (green). These can also be overprinted to give a wide range of colours in the output.
As you say, it is more difficult on an original impact printer (which might have a black, red and blue ribbon) - however, as I am trying to emulate an Epson Stylus Colour 850 inkjet, colour mixing is a necessary evil.
I tried using the simple colour mixing method (add 2 RGB colours together and divide by 2), but they seemed quite a bit different from what I was expecting when comparing stuff I printed on the QL to my old Epson printer (admittedly no longer available for testing).... The convert to CMYK, mix and then convert back to RGB has been based on a routine written by someone else in Python and seems to give better results (but not perfect).
Dave wrote:(5945 * 8417 * 3) / 1024 = 146599K or 144MB. Hmmmm. Then that doesn't sound so bad then
Can you assemble multiple page PDFs in RAM? With 1GB RAM on Pi3, maybe 600MB usable, what is your PDF page limit? Or are you treating each page as a separate standalone print job?
We are treating each page as a separate print job because for the retro-printer module, we have no idea when a device sends the end of a multi-page document. Arguably for the public domain version (which is converting a file), we could handle create a multi-page PDF from that one file, but that is the beauty of sharing the code - if someone wants to do that, they can create a fork from the main code which offers this.