foo2oak-wrapper(1)

✨ foo2oak-wrapper β€” the manual page, but make it a group chat πŸ’–

okay so bestie, gather round, because today we're talking about foo2oak-wrapper, a little script from the General Commands Manual section that lives in your terminal and does something genuinely iconic: it turns Postscript into an OAKT printer stream. no cap. πŸ¦‹


🌸 NAME 🌸

foo2oak-wrapper β€” Convert Postscript into an OAKT printer stream. that's it, that's the whole job, and she does it beautifully πŸ’…


⭐ SYNOPSIS ⭐

foo2oak-wrapper [options] [ps-file]

πŸŽ€ DESCRIPTION πŸŽ€

so foo2oak-wrapper is a Foomatic compatible printer wrapper for the foo2oak printer driver. she reads a Postscript ps-file β€” or just standard input, she's not picky, she's flexible like that β€” and converts it into Oak Technology OAKT printer format so it can actually drive the HP Color LaserJet 1500 laser printer, the Kyocera KM-1636/KM-2035 copiers, and honestly any other OAKT-based printers that wanna join the party. 🫢

and like, yes, you can use this script in a standalone fashion, she's independent, she has main character energy. but her true calling? being called from a printer spooler system that uses the Foomatic printer database. iykyk. πŸ”₯


πŸ‘‘ COMMAND LINE OPTIONS πŸ‘‘

🌈 Normal Options 🌈

these are the options you use to pick the parameters of a print job β€” the stuff you usually control per job, one print at a time, no commitment. πŸ’œ

  • -b bits β€” Number of bits per plane (1 or 2) [1].
  • -c β€” Print in color (else monochrome). slay 🌈
  • -d duplex β€” Duplex code to send to printer [1].
    • 1 β€” off
    • 2 β€” long edge
    • 3 β€” short edge
  • -m media β€” Media code to send to printer [1]. the codes differ depending on which column you're living in, so here's the whole vibe check:
    • Media / HP CLJ 1500 (-z0) / KM-1635 (-z1)
    • autoselect β€” 0 / 0
    • plain β€” 1 / 1
    • preprinted β€” 2 / 2
    • letterhead β€” 3 / 3
    • transparency β€” 4 / 4
    • prepunched β€” 5 / 5
    • labels β€” 6 / 6
    • bond β€” 7 / 7
    • recycled β€” 8 / 8
    • color β€” 9 / 9
    • cardstock β€” 10 / 10
    • envelope β€” 11 / 11
    • light β€” 13 / na
    • tough β€” 14 / na
    • vellum β€” na / 15
    • rough β€” na / 16
    • thick β€” na / 19
    • highqual β€” na / 20
  • -p paper β€” Paper size code to send to printer [1]. the full menu, no skips:
    • 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 [1]. (yes bestie, 1 is the default for basically everything, she's consistent πŸ’€)
  • -r xresxyres β€” Set device resolution in pixels/inch [600x600].
  • -s source β€” Source (Input Slot) code to send to printer [7].
    • 1 tray1
    • 2 tray2
    • 4 manual
    • 7 auto
  • **-2 -3 -4 -5 -6 -8 -9 -10 -12 -14 -15 -16 -18 β€” Print in N-up. Requires the psutils package. (so many little pages, it's giving scrapbook πŸŽ€)
  • -o orient β€” Orientation used for N-up.
    • Portrait β€” -op (normal)
    • Landscape β€” -ol (rotated 90 degrees anticlockwise)
    • Seascape β€” -os (rotated 90 degrees clockwise)

🧚 Printer Tweaking Options 🧚

these ones are for customizing how foo2oak operates for a particular printer. it's personal, it's intimate, it's a whole relationship. πŸ’–

  • -u xoffxyoff β€” Set the offset of the start of the printable region from the upper left corner, in pixels [varies with paper size]. The defaults should work on the 2200DL and 2300DL, and have not been tested on any other printers.
  • -l xoffxyoff β€” Set the offset of the end of the printable region from the lower right corner, in pixels [varies with paper size]. The defaults should work on the 2200DL and 2300DL, and have not been tested on any other printers.
  • -L mask β€” Send the logical clipping values from -u/-l in the OAKT stream. foo2oak-wrapper always runs Ghostscript with the ideal page dimensions, so that the scale of the image is correct, regardless whether or not the printer has unprintable regions. This option is used to move the position of the clipped image back to where it belongs on the page. The default is to send the amount which was clipped by -u and -l, and should be good in most cases.
    • 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
  • -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.

πŸ’… Color Tweaking Options πŸ’…

these control the quality of color output. and like… Color correction is currently a WORK IN PROGRESS. not me warning you twice, but fr fr, it's a work in progress. πŸ™ˆ

  • -g gsopts β€” Additional options to pass to Ghostscript, such as -gβ€œ-dDITHERPPI=nnn”, etc. This option may appear more than once. (go off, stack them πŸ‘‘)
  • -G profile.icm β€” Convert profile.icm to a Postscript color rendering dictionary (CRD) using foo2zjs-icc2ps and adjust the printer colors by using the Postscript setcolorrendering operator. (WORK IN PROGRESS).
  • -G gamma-file.ps β€” Prepend gamma-file.ps to the Postscript input to perform color correction using the setcolortransfer Postscript operator. For example, the file might contain:
{0.333 exp} {0.333 exp} {0.333 exp} {0.333 exp} setcolortransfer
  • -I intent β€” Select profile intent from the ICM file. 0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute. Default is 0 (perceptual).

πŸ”₯ Debugging Options πŸ”₯

for debugging foo2oak and its wrapper. detective mode activated πŸ•΅οΈ

  • -S plane β€” Output just a single color plane from a color print and print it on the black plane. The default is to output all color planes.
    • 1 β€” Cyan
    • 2 β€” Magenta
    • 3 β€” Yellow
    • 4 β€” Black
  • -D level β€” Set Debug level [0].

πŸ’€ EXAMPLES πŸ’€

Create a monochrome OAKT stream from a Postscript document, examine it, and then print it using a RAW print queue:

foo2oak-wrapper testpage.ps > testpage.oak
oakdecode < testpage.oak
lpr -P raw testpage.oak

Create a color OAKT stream from a Postscript document:

foo2oak-wrapper -c testpage.ps > testpage.oak

πŸ“ FILES πŸ“

  • /usr/bin/foo2oak-wrapper

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHOR πŸ’œ


okay that's the whole page bestie, you ate that 🫢 and just so you know where this came from: it's a General Commands Manual page for foo2oak-wrapper(1) β€” the same manual, top and bottom, like a little matching set πŸ’… β€” brought to you by Rick Richardson, with the project living at http://foo2oak.rkkda.com/. go forth and print, you absolute icon β­πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from