Printing sewing patterns
My partner and myself sew, and my partner has been going to the library to print sewing patterns. Apparently, not very many FOSS programs can split a large file into pages that can be assembled into a larger image.
My printer would be able to do that easily! I just had to read (and re-read) a section from a manual on PCL. I am using “ESC + ‘*’” to send lines of graphics to send lines of graphics to the printer.
First step was grabbing a tool to handle SVGs. I found that on Shithub from Phil9. Then it was a simple matter to remove transparency and pipe it into the prorgam.
#!/bin/rc
svg -d 60 -9 $1 |\
image/cfilter -f noalpha |\
iconv -u -c m8 |\
pcl/poster > /dev/lpt2data
Getting images working correctly was a bit of a hassle. I’m a bit rusty in my programming, and each line of bits had to be packed to the height of the print-head. The first problem was that I kept getting extra columns from memimage(2), which led to some interesting distortions.
In the process, I wrote a companion file that covers most of the PCL funcitons my printer supports, allowing for some pretty cool stuff…
Coming soon…