foo2oak(1)
π NAME π
foo2oak β converts Ghostscript pbmraw, pgmraw or bitcmyk format into an OAKT printer stream β¨
okay so real talk, this is the foo2oak(1) page from the General Commands Manual, and it's lowkey iconic. let's get into it bestie π«Ά
π SYNOPSIS π
foo2oak [options] <pbmraw-file >OAKT-file
foo2oak [options] <pgmraw-file >OAKT-file
foo2oak [options] <bitcmyk-file >OAKT-file
like, you pipe stuff in, you pipe stuff out. the vibe is flowing π
π¦ DESCRIPTION π¦
foo2oak takes Ghostscript pbmraw or bitcmyk output formats and converts them into monochrome or color OAKT streams. and why do we care?? because those streams are literally what drives the HP Color LaserJet 1500 laser printer, the Kyocera KM-1636/KM-2035 copiers, and honestly just, like, other OAKT-based printers in general. it's giving translator, but make it printer-coded π¨οΈβ¨
π COMMAND LINE OPTIONS π
β Normal Options β
these are the options that pick the parameters of a print job β the stuff you'd usually control on a per-job basis, yk? like the main character settings π
-cβ forces color mode, for when autodetect is simply not picking up what you're putting down.-d duplexβ the duplex code you send to the printer. default is1.1β off2β long edge3β short edge
-g xpixxypixβ sets the page dimensions in pixels. default is10200x6600.-m mediaβ the media code you send to the printer. default is1.autoselectβ0plainβ1preprintedβ2letterheadβ3transparencyβ4prepunchedβ5labelsβ6bondβ7recycledβ8colorβ9cardstockβ10envelopeβ11lightβ13toughβ14vellumβ15roughβ16thickβ19highqualβ20
-p paperβ the paper code you send to the printer. default is1.1β letter3β ledger5β legal6β statement7β executive8β A39β A411β A512β B413β B5jis14β folio19β env920β env1027β envDL28β envC530β envC437β envMonarch257β A6258β B6259β B5iso260β env6
-n copiesβ number of copies. default is1.-r xresxyresβ sets the device resolution in pixels/inch. default is600x600.-s sourceβ the source (InputSlot) code you send to the printer. default is7.1β tray12β tray24β manual7β auto
-J filenameβ a filename string to send to the printer.-U usernameβ a username string to send to the printer.
πΈ Printer Tweaking Options πΈ
these ones are for customizing how foo2oak behaves with one specific printer. personalization era π
-u xoffxyoffβ sets the offset of the start of the printable region from the upper left corner, in pixels. default is0x0.-l xoffxyoffβ sets the offset of the end of the printable region from the lower right corner, in pixels. default is0x0.-L maskβ sends the logical clipping amounts implied by-u/-lin the OAKT stream. default is3.0β don't send any logical clipping amounts1β only send Y clipping amount2β only send X clipping amount3β send both X and Y clipping amounts
-Aβ AllIsBlack: convertsC=1,M=1,Y=1to justK=1. works withbitcmykinput only.-Bβ BlackClears:K=1forcesC,M,Yto0. works withbitcmykinput only.-M mirrorβ mirror bytes. Mirror is0for Kyocera KM-1635/KM-2035 and1for the HP Color LaserJet 1500. the default is1.-z modelβ Model is0for the HP Color LaserJet 1500, and1for the Kyocera KM-1635/KM-2035 copiers. the default is0.
π₯ Debugging Options π₯
for when you're debugging foo2oak and things are not giving what they're supposed to give π
-S planeβ outputs just a single color plane from a color print, and prints it on the black plane. the default is to output all color planes.1β Cyan2β Magenta3β Yellow4β Black
-D levelβ sets the Debug level. default is0.
β¨ EXAMPLES β¨
okay bestie, here's the actual glow-up. create a black and white OAKT stream:
gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=letter -r600x600 -sDEVICE=pbmraw
-sOutputFile=- - < testpage.ps
| foo2oak -r600x600 -g5100x6600 -p1 >testpage.oak
and now, create a color OAKT stream π:
gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=letter -g5100x6600 -r600x600 -sDEVICE=bitcmyk
-sOutputFile=- - < testpage.ps
| foo2oak -r600x600 -g5100x6600 -p1 >testpage.oak
see how the -sDEVICE switches from pbmraw to bitcmyk?? that's the whole plot twist π¬
π FILES π
/usr/bin/foo2oak
π§ SEE ALSO π§
π AUTHOR π
Rick Richardson <rick.richardson@comcast.net> http://foo2oak.rkkda.com/
and that's the whole page, no skips, no cap π
this lil masterpiece came out of the General Commands Manual, section 1 β no version or date lines on this one, so just vibes and the manual name, periodt π
π¦ where this page comes from
- ubuntu noble: printer-driver-foo2zjs-common 20200505dfsg0-2ubuntu6 Β· GPL-2.0-or-later
- ubuntu questing: printer-driver-foo2zjs-common 20200505dfsg0-2ubuntu6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms