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 is 1.
    • 1 β€” off
    • 2 β€” long edge
    • 3 β€” short edge
  • -g xpixxypix β€” sets the page dimensions in pixels. default is 10200x6600.
  • -m media β€” the media code you send to the printer. default is 1.
    • autoselect β€” 0
    • plain β€” 1
    • preprinted β€” 2
    • letterhead β€” 3
    • transparency β€” 4
    • prepunched β€” 5
    • labels β€” 6
    • bond β€” 7
    • recycled β€” 8
    • color β€” 9
    • cardstock β€” 10
    • envelope β€” 11
    • light β€” 13
    • tough β€” 14
    • vellum β€” 15
    • rough β€” 16
    • thick β€” 19
    • highqual β€” 20
  • -p paper β€” the paper code you send to the printer. default is 1.
    • 1 β€” letter
    • 3 β€” ledger
    • 5 β€” legal
    • 6 β€” statement
    • 7 β€” executive
    • 8 β€” A3
    • 9 β€” A4
    • 11 β€” A5
    • 12 β€” B4
    • 13 β€” B5jis
    • 14 β€” folio
    • 19 β€” env9
    • 20 β€” env10
    • 27 β€” envDL
    • 28 β€” envC5
    • 30 β€” envC4
    • 37 β€” envMonarch
    • 257 β€” A6
    • 258 β€” B6
    • 259 β€” B5iso
    • 260 β€” env6
  • -n copies β€” number of copies. default is 1.
  • -r xresxyres β€” sets the device resolution in pixels/inch. default is 600x600.
  • -s source β€” the source (InputSlot) code you send to the printer. default is 7.
    • 1 β€” tray1
    • 2 β€” tray2
    • 4 β€” manual
    • 7 β€” 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 is 0x0.
  • -l xoffxyoff β€” sets the offset of the end of the printable region from the lower right corner, in pixels. default is 0x0.
  • -L mask β€” sends the logical clipping amounts implied by -u/-l in the OAKT stream. default is 3.
    • 0 β€” don't send any logical clipping amounts
    • 1 β€” only send Y clipping amount
    • 2 β€” only send X clipping amount
    • 3 β€” send both X and Y clipping amounts
  • -A β€” AllIsBlack: converts C=1,M=1,Y=1 to just K=1. works with bitcmyk input only.
  • -B β€” BlackClears: K=1 forces C,M,Y to 0. works with bitcmyk input only.
  • -M mirror β€” mirror bytes. Mirror is 0 for Kyocera KM-1635/KM-2035 and 1 for the HP Color LaserJet 1500. the default is 1.
  • -z model β€” Model is 0 for the HP Color LaserJet 1500, and 1 for the Kyocera KM-1635/KM-2035 copiers. the default is 0.

πŸ”₯ 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 β€” Cyan
    • 2 β€” Magenta
    • 3 β€” Yellow
    • 4 β€” Black
  • -D level β€” sets the Debug level. default is 0.

✨ 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