Writing your own CUPS printer driver in 100 lines of Python (2018)
9 comments
·May 25, 2025behnamoh
LargoLasskhyfv
Did you try http://sane-project.org for the scanner part? They have support for some Canons, maybe you're lucky?
asveikau
Many years ago I remember Windows support vanished on a bunch of printers at the 32 to 64 bit transition. That was around the time I learned how printing on Linux and BSD worked, to save a printer or two.
userbinator
However, the license of the BOCA driver forbids using their driver to control printers of other vendors.
Since this is a printer, I interpret those the same way as "you're not allowed to use third-party ink": I don't care.
roywashere
Pretix is a very interesting piece of open source software for selling event tickets. It’s nice to see them venturing out to writing printer drivers for ticket printers! All the best for them.
saltcured
This takes me waaaaaaaay back to when I did my first bit of practical low-level programming. I wrote a little C program that translated PNM bitmaps into the wire format for my dusty 24-pin Epson dot matrix printer. I don't remember the details, but I used it with some plugin system involving Ghostview to print postscript documents from my first Linux system in the early 90s.
null
whycome
Is there an LLM specifically for this use case scenario?
a-ungurianu
I’m not clear what you’re asking with this question.
Do you mean a LLM to write printer drivers? For that I think any of the coding LLMs should be able to help
Or do you mean using an LLM to do the raster -> FGL format translation? While I’m sure it might be possible, feels like an awful waste of resources, and when it comes to printers, you kinda want the guarantee that what comes out is the same that comes in.
https://gimp-print.sourceforge.io/ which uses CUPS helped me resurrect an old Canon printer for which the company refused to provide updated drivers on macOS.
I was about to throw it in the recycling/trash, but I just couldn't accept that a perfectly fine hardware was crippled because the software was not updated to work on the latest macOS versions. Perplexity pointed me to Gutenprint and it worked wonderfully! The only thing that doesn't work is the scanner functionality.