How to build a printer
Posted by cat-whisperer 8 hours ago
Comments
Comment by ValdikSS 4 hours ago
You can (and should!) define exact dimensions of your screen in `media-size-supported`. It will probably be a non-standard IPP name, that's why you should define that in `media-supported` as `om_NNNmmxYYYmm` or `oe_NNNinxYYYin`
That way you don't need to scale the incoming data, the PC will format it exactly to the dimensions of the screen.
Both PWG Raster and Apple Raster support 1-bit-per-pixel mode (instead of 8-bit-per-pixel you use), that's why the input could be 8 times less in size. Use `print-color-mode-{supported,default}=bi-level` instead of `monochrome` for that. And also tune `urf-supported`'s `W` option, use `W1` for this case.
The screen/dithering could be ass in 1-bit mode, see https://github.com/OpenPrinting/libcupsfilters/pull/160 where I added more dithering options (Linux-only though, Apple seems to abandon their CUPS).
Comment by Neywiny 4 hours ago
Comment by ValdikSS 4 hours ago
It's bugs on bugs, with bugs chasing bugs! So little developers, so complex stack with 25 years of technical debt, and little community around because it's not a sexy technology to be involved in.
That's why I have to dive deep and fix my bugs myself if I want to make it work properly as I would like it to. I also ended up making my own print server device, because China did not make a proper one for some reason for all these years.
Comment by cat-whisperer 4 hours ago
Comment by jiehong 13 minutes ago
Regarding the size of the page being sent to the printer, I remember reading that printers used to be postscript interpreters and the result of that program would be the page.
Perhaps that would trade ram for compute, but might be more complex in the end.
Comment by alternativeworl 4 hours ago
Comment by cat-whisperer 4 hours ago
Comment by tapia 1 hour ago
Comment by IdiotSavage 31 minutes ago
Unfortunately printing support seems to go out of fashion, at least in macOS land.
Lately I needed a quick printout of a markdown document. I could have used TextEdit for the raw text, but I wanted the styling too. Learned that neither VSCode, Xcode nor Obsidian can print. (There is a community plugin for Obsidian.)
Comment by e12e 1 hour ago
Comment by ks2048 5 hours ago
Comment by tdeck 3 hours ago
Comment by voxelghost 7 minutes ago
Comment by cat-whisperer 5 hours ago
Comment by d--b 1 hour ago
Comment by jarboot 6 hours ago
Comment by cat-whisperer 6 hours ago
Comment by nomel 6 hours ago
Comment by cat-whisperer 6 hours ago
Comment by valleyer 6 hours ago
Comment by sudo_cowsay 5 hours ago
Comment by greazy 5 hours ago
The author "prints" to the eink display. Why not load say the pdf directly?
Comment by sowbug 1 hour ago
I'm not going to create a recipe PDF and load it on an e-reader. That's too much work. But I will happily press control-P on a recipe web page and select the eink display as the target.
Comment by cat-whisperer 1 hour ago
Comment by stdatomic 5 hours ago
> But getting stuff onto it was tedious. I had to join its hotspot and open a little upload website in my browser. Yuck.
Anyway, very creative, I like the idea a lot.
Comment by cat-whisperer 5 hours ago
> Kindles have a ton of RAM, this one didn't.
Comment by ghostly_s 4 hours ago
Comment by mrheosuper 4 hours ago
Comment by joshmarinacci 5 hours ago
Comment by ValdikSS 4 hours ago
- 4 font formats
- 9 image formats
- blending with transparency
- different colorspaces, each image could use its own on the page
- different dithering algorithms, each image with its own
- the page can have elements from another pages (global elements)
This is only a small part from the top of my head.Common simple home printers absolutely should not accept regular PDF as an input: thanks to Apple and IETF we now have Apple Raster and PWG Raster for printers, as a part of AirPrint and IPP Everywhere/Mopria driverless printing standards, which are very similar but have slightly different options and headers. It's a simple raster input for printers specifically.
Some companies, such as HP, invented a "raster PDF": PCLm / PCLms. Don't be confused by the name, it's a regular standard-conforming PDF which contain nothing but a full-page JPEG on each page, and don't use any other features. It's created only to be able to open "printed page" (driver output) in a standard PDF viewer on a PC for debugging or business logging needs, but otherwise it's like a regular JPEG with additional per-page metadata.
Comment by ghostly_s 4 hours ago
Comment by cat-whisperer 4 hours ago
check page 3. even I was surprised
Comment by cat-whisperer 5 hours ago
Kindles have a ton of RAM, this one didn't.
Comment by bluGill 5 hours ago
Comment by NDlurker 5 hours ago
Comment by cat-whisperer 5 hours ago
Comment by andyfilms1 7 hours ago
Comment by cat-whisperer 6 hours ago
Comment by stavros 6 hours ago
Comment by a2dam 6 hours ago
Comment by cat-whisperer 6 hours ago
Comment by stavros 6 hours ago
Comment by cat-whisperer 5 hours ago
Comment by hamaluik 5 hours ago
Comment by sho_hn 6 hours ago
Comment by Brian_K_White 7 hours ago
Comment by phoenixtao 2 hours ago