foo2zjs-wrapper(1)

πŸ’– foo2zjs-wrapper β€” bestie edition πŸ’–

okay so this is the foo2zjs-wrapper page from the General Commands Manual (that's the man section 1, the "you just type it in a shell" zone), and bestie, I'm about to make you obsessed with a printer wrapper. no cap. πŸŽ€


✨ NAME ✨

foo2zjs-wrapper β€” the thing that turns Postscript into a ZJS printer stream. that's the whole job. it's giving translator, it's giving bridge, it's giving middle management for your laser printer. πŸ’…


🌈 SYNOPSIS 🌈

foo2zjs-wrapper [options] [ps-file]

πŸ¦‹ DESCRIPTION πŸ¦‹

So. foo2zjs-wrapper is a Foomatic compatible printer wrapper for the foo2zjs printer driver. Foomatic is that whole printer database situation, and this script is the wrapper that plays nice with it.

What it actually does: it reads a Postscript ps-file β€” or standard input if you don't hand it a file β€” and converts it into Zenographics ZjStream printer format. And why would you want that? Because that's the language needed to drive the Minolta/QMS 2300 DL network color laser printer plus other Zenographics-based printers. iconic lineage honestly.

You can run this script standalone, all by itself, living its main character life. But the intended vibe is to be called from a printer spooler system that uses the Foomatic printer database. that's where it really shines. ✨


πŸ‘‘ COMMAND LINE OPTIONS πŸ‘‘

🌸 Normal Options 🌸

These are the options for picking the parameters of a print job β€” the stuff you usually control on a per-job basis. lowkey the everyday essentials.

  • -c β€” Print in color. (If you don't say this, you get monochrome. simple as that. πŸ’€)
  • -C colormode β€” Color correction mode, default is 0.
    • 1 β€” Photos (using m2300w CRDs)
    • 2 β€” Photos and text (using m2300w CRDs)
    • 3 β€” Graphics and text (using m2300w CRDs)
    • 10 β€” ICM color profile (using -G *.icm file)
  • -d duplex β€” Duplex code to send to the printer, default is 1.
    • 1 β€” off
    • 2 β€” long edge
    • 3 β€” short edge
  • -m media β€” Media code to send to the printer, default is 1.

The codes depend on your model, so here's the whole menu, no skipping:

  • standard β€” 2300DL/HP 1005 (-z0): 1 Β· 2200DL (-z0): 1 Β· HP 1018/HP 1020 (-z1): 1 Β· HP P1102/HP P1606 (-z2): 1 Β· HP CP1025 (-z3): 1
  • transparency β€” 2300DL/HP 1005 (-z0): 2 Β· 2200DL (-z0): 2 Β· HP 1018/HP 1020 (-z1): 2 Β· HP P1102/HP P1606 (-z2): 2 Β· HP CP1025 (-z3): 2
  • envelope β€” 2300DL/HP 1005 (-z0): 257 Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 267 Β· HP P1102/HP P1606 (-z2): 267 Β· HP CP1025 (-z3): 267
  • letterhead β€” 2300DL/HP 1005 (-z0): 259 Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 513 Β· HP P1102/HP P1606 (-z2): 513 Β· HP CP1025 (-z3): 513
  • bond β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 260 Β· HP P1102/HP P1606 (-z2): 260 Β· HP CP1025 (-z3): 260
  • thick β€” 2300DL/HP 1005 (-z0): 261 Β· 2200DL (-z0): 4 Β· HP 1018/HP 1020 (-z1): 261 Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): na
  • postcard β€” 2300DL/HP 1005 (-z0): 262 Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): na
  • rough β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 263 Β· HP P1102/HP P1606 (-z2): 263 Β· HP CP1025 (-z3): 263
  • heavy β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 262 Β· HP P1102/HP P1606 (-z2): 262 Β· HP CP1025 (-z3): 262
  • labels β€” 2300DL/HP 1005 (-z0): 263 Β· 2200DL (-z0): 3 Β· HP 1018/HP 1020 (-z1): 263 Β· HP P1102/HP P1606 (-z2): 265 Β· HP CP1025 (-z3): 265
  • vellum β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 273 Β· HP P1102/HP P1606 (-z2): 273 Β· HP CP1025 (-z3): 273
  • medium β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): 282 Β· HP CP1025 (-z3): 282
  • extraheavy β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): 283 Β· HP CP1025 (-z3): 283
  • color β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 512 Β· HP P1102/HP P1606 (-z2): 512 Β· HP CP1025 (-z3): 512
  • light β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 258 Β· HP P1102/HP P1606 (-z2): 258 Β· HP CP1025 (-z3): 258
  • preprinted β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 514 Β· HP P1102/HP P1606 (-z2): 514 Β· HP CP1025 (-z3): 514
  • prepunched β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 515 Β· HP P1102/HP P1606 (-z2): 515 Β· HP CP1025 (-z3): 515
  • recycled β€” 2300DL/HP 1005 (-z0): na Β· 2200DL (-z0): na Β· HP 1018/HP 1020 (-z1): 516 Β· HP P1102/HP P1606 (-z2): 516 Β· HP CP1025 (-z3): 516
  • -p paper β€” Paper size code to send to the printer, default is 1. and here's the whole chart because we do not gatekeep:
    • letter β€” MC 2300DL/HP 1005 (-z0): 1 Β· HP 1018/HP 1020 (-z1): 1 Β· HP P1102/HP P1606 (-z2): 1 Β· HP CP1025 (-z3): 1
    • legal β€” MC 2300DL/HP 1005 (-z0): 5 Β· HP 1018/HP 1020 (-z1): 5 Β· HP P1102/HP P1606 (-z2): 5 Β· HP CP1025 (-z3): 5
    • executive β€” MC 2300DL/HP 1005 (-z0): 7 Β· HP 1018/HP 1020 (-z1): 7 Β· HP P1102/HP P1606 (-z2): 7 Β· HP CP1025 (-z3): 7
    • A4 β€” MC 2300DL/HP 1005 (-z0): 9 Β· HP 1018/HP 1020 (-z1): 9 Β· HP P1102/HP P1606 (-z2): 9 Β· HP CP1025 (-z3): 9
    • A5 β€” MC 2300DL/HP 1005 (-z0): 11 Β· HP 1018/HP 1020 (-z1): 11 Β· HP P1102/HP P1606 (-z2): 11 Β· HP CP1025 (-z3): 11
    • B5jis β€” MC 2300DL/HP 1005 (-z0): 13 Β· HP 1018/HP 1020 (-z1): 13 Β· HP P1102/HP P1606 (-z2): 13 Β· HP CP1025 (-z3): 13
    • env #10 β€” MC 2300DL/HP 1005 (-z0): 20 Β· HP 1018/HP 1020 (-z1): 20 Β· HP P1102/HP P1606 (-z2): 20 Β· HP CP1025 (-z3): 20
    • env DL β€” MC 2300DL/HP 1005 (-z0): 27 Β· HP 1018/HP 1020 (-z1): 27 Β· HP P1102/HP P1606 (-z2): 27 Β· HP CP1025 (-z3): 27
    • env CL β€” MC 2300DL/HP 1005 (-z0): 28 Β· HP 1018/HP 1020 (-z1): 28 Β· HP P1102/HP P1606 (-z2): 28 Β· HP CP1025 (-z3): 28
    • env B5 β€” MC 2300DL/HP 1005 (-z0): 34 Β· HP 1018/HP 1020 (-z1): 34 Β· HP P1102/HP P1606 (-z2): 34 Β· HP CP1025 (-z3): 34
    • env Monarch β€” MC 2300DL/HP 1005 (-z0): 37 Β· HP 1018/HP 1020 (-z1): 37 Β· HP P1102/HP P1606 (-z2): 37 Β· HP CP1025 (-z3): 37
    • postcard (japan) β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 260 Β· HP P1102/HP P1606 (-z2): 43 Β· HP CP1025 (-z3): 43
    • B5iso β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 259 Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): na
    • A6 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 262 Β· HP P1102/HP P1606 (-z2): 70 Β· HP CP1025 (-z3): 70
    • double postcard rotated β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 261 Β· HP P1102/HP P1606 (-z2): 82 Β· HP CP1025 (-z3): 82
    • 16k 197x273 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 257 Β· HP P1102/HP P1606 (-z2): 257 Β· HP CP1025 (-z3): 257
    • fanfold german legal β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): 258 Β· HP P1102/HP P1606 (-z2): 258 Β· HP CP1025 (-z3): 258
    • 16k 184x260 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): 263 Β· HP CP1025 (-z3): 263
    • 16k 195x270 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): 264 Β· HP CP1025 (-z3): 264
    • photo 4x6 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): 268
    • photo 5x8 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): 269
    • photo 10x15 β€” MC 2300DL/HP 1005 (-z0): na Β· HP 1018/HP 1020 (-z1): na Β· HP P1102/HP P1606 (-z2): na Β· HP CP1025 (-z3): 270
  • -n copies β€” Number of copies, default is 1. yes queen, print it twelve times, go off.
  • -r xresxyres β€” Set device resolution in pixels/inch, default is 1200x600.
  • -s source β€” Source (Input Slot) code to send to the printer, default is 7.
    • 1 β€” upper
    • 2 β€” lower
    • 4 β€” manual
    • 7 β€” auto
  • -t β€” Draft mode. Every other pixel is white. it's giving ✨sparse✨
  • -T density β€” Print density (1-5). The default is 3 (medium).
  • -2 -3 -4 -5 -6 -8 -9 -10 -12 -14 -15 -16 -18 β€” Print in N-up. Requires the psutils package. (yeah, that's a lot of flags, and yeah, you need the package, no shortcuts πŸ’…)
  • -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 are the options used to customize the operation of foo2zjs for a particular printer. it's giving bespoke, it's giving tailoring. πŸͺ‘

  • -u xoffxyoff β€” Set the offset of the start of the printable region from the upper left corner, in pixels (default 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 (default varies with paper size). Same deal: 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 ZjStream.

Okay so context, because this one is lowkey galaxy-brain: foo2zjs-wrapper always runs Ghostscript with the ideal page dimensions, so that the scale of the image is correct β€” regardless of 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 that 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
  • -P β€” Do not send START_PLANE codes on monochrome output. May be needed by some monochrome-only printers, such as the HP LaserJet 1000. so if your printer is strictly a black-and-white girly, this might be the one.
  • -X padlen β€” Add extra zero padding to the end of BID segments. The default is 16 bytes. Padding 16 bytes of zeroes is needed for older ZjStream printers, such as the Minolta 2200DL and HP LaserJet 1000, and seems harmless to newer ones, such as the Minolta 2300DL. So the default should be good for all cases. slay, backwards compatibility. 🫢
  • -z model β€” Model. Default is 0.
    • 0 β€” KM 2300DL / HP 1000 / HP 1005
    • 1 β€” HP 1018 / HP 1020 / HP 1022
    • 2 β€” HP Pro P1102 / P1566 / P1606dn
    • 3 β€” HP Pro CP1025

πŸŽ€ Color Tweaking Options πŸŽ€

These are the options used to control the quality of color output.

⚠️ Color correction is currently a WORK IN PROGRESS. not me warning you, the manpage said it. 😭
  • -g gsopts β€” Additional options to pass to Ghostscript, such as -gβ€œ-dDITHERPPI=nnn”, etc. This option may appear more than once. stack them like stickers on a laptop. ✨
  • -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 πŸ”₯

These options are used for debugging foo2zjs 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, default is 0.

🌟 EXAMPLES 🌟

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

foo2zjs-wrapper testpage.ps > testpage.zm
zjsdecode < testpage.zm
lpr -P raw testpage.zm

Create a color ZjStream stream from a Postscript document:

foo2zjs-wrapper -c testpage.ps > testpage.zc

πŸ“ FILES πŸ“

  • /usr/bin/foo2zjs-wrapper

πŸ’œ SEE ALSO πŸ’œ


⭐ AUTHOR ⭐


okay bestie that's the whole page, every flag, every code, every table cell, all of it. no gatekeeping, no skimming, we ate and left no crumbs. 🫢

This is the foo2zjs-wrapper(1) page from the General Commands Manual β€” shoutout to the standard manual setup that keeps our pages looking cute and consistent β€” and the author credit belongs to Rick Richardson, with the project living at http://foo2zjs.rkkda.com/. go forth and print. πŸ’…βœ¨

πŸ“¦ where this page comes from