foo2hbpl2-wrapper(1)

πŸ’– foo2hbpl2-wrapper β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to foo2hbpl2-wrapper, straight out of the General Commands Manual (section 1, obviously, she's a command). pull up a chair, grab a boba, we're gonna turn Postscript into printer goop together. 🫢


✨ NAME ✨

foo2hbpl2-wrapper β€” Convert Postscript into a ZJS printer stream. that's the whole vibe. postscript goes in, ZjStream comes out, printer goes brrrr πŸ’…


🌸 SYNOPSIS 🌸

foo2hbpl2-wrapper [options] [ps-file]

πŸ¦‹ DESCRIPTION πŸ¦‹

so foo2hbpl2-wrapper is a Foomatic compatible printer wrapper for the foo2hbpl2 printer driver. it reads a Postscript ps-file (or just slurps from standard input, no pressure) and converts it into Zenographics ZjStream printer format. it's giving translator, it's giving middleman, it's giving the moment ✨

and who is this for, you ask? the girlies:

  • Dell 1355
  • Dell C1765
  • Epson AcuLaser M1400
  • Epson AcuLaser CX17NF
  • Fuji Xerox DocuPrint CM205
  • Fuji Xerox DocuPrint CM215
  • Fuji Xerox DocuPrint P205
  • Xerox Phaser 3010
  • Xerox Phaser 3040
  • Xerox WorkCentre 3045 MFP
  • Xerox WorkCentre 6015 MFP

you can run this script standalone, bestie, it's not codependent β€” but her true purpose, her main character arc, is 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'd usually control per job, ya know? the everyday slay.

  • -c β€” print in color (otherwise it's monochrome, sad beige printer).
  • -C colormode β€” color correction mode, default [0].
    • 10 β€” ICM color profile (using the -G *.icm file)
  • -d duplex β€” the duplex code you send to the printer, default [1].
    • 1 β€” off
    • 2 β€” long edge
    • 3 β€” short edge
  • -m media β€” media code to send to the printer, default [1]. the HBPL codes are:
Media       HBPL
plain          1
bond           2
lwcard         3
lwgcard        4
labels         5
envelope       6
recycled       7
plain2         8
bond2          9
lwcard2       10
lwgcard2      11
recycled2     12
  • -p paper β€” paper size code to send to the printer, default [1]. the HBPL codes:
Paper                  HBPL
A4                        1
B5jis                     2
A5                        3
letter                    4
executive                 5
fanfold german legal      6
folio                     6
legal                     7
env#10                    9
envMonarch               10
envC5                    11
envDL                    12
heads up bestie, fanfold german legal and folio are both code 6. that's not a typo, that's just how it is. πŸ’€
  • -n copies β€” number of copies, default [1]. one is never enough tho.
  • -r xresxyres β€” set device resolution in pixels/inch, default [1200x600].
  • -s source β€” source (input slot) code to send to the printer, default [7].
    • 1 β€” upper
    • 2 β€” lower
    • 4 β€” manual
    • 7 β€” auto
  • -t β€” draft mode. every other pixel is white. she's ✨minimalist✨, she's conserving toner, she's doing less on purpose.
  • -T density β€” print density, 1–5. the default is 3 (medium). not too much, not too little, goldilocks energy.
  • -2 -3 -4 -5 -6 -8 -9 -10 -12 -14 -15 -16 -18 β€” print in N-up. requires the psutils package. (yes, that's a lot of flags, no, we're not skipping any, every single one is listed. periodt.)
  • -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 for customizing how foo2hbpl2 behaves on your specific printer. your printer, your rules, your tweaks πŸ’…

  • -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 tea: 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. foo2hbpl2-wrapper always runs Ghostscript with the ideal page dimensions so the scale of the image is correct, regardless of whether 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
  • -P β€” do not send START_PLANE codes on monochrome output. may be needed by some monochrome-only printers, such as the HP LaserJet 1000.
  • -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. icon behavior honestly 🌟

🌸 Color Tweaking Options

these control the quality of color output. and bestie, real talk: color correction is currently a WORK IN PROGRESS. we're all just doing our best here 😭

  • -g gsopts β€” additional options to pass to Ghostscript, such as -gβ€œ-dDITHERPPI=nnn”, etc. this option may appear more than once. (stack 'em, queen.)
  • -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 when you need to peer into the soul of foo2hbpl2 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 [0].

⭐ EXAMPLES ⭐

okay so here's the classic: make a monochrome ZjStream from a Postscript document, examine it (look at her, she's beautiful), and then print it using a RAW print queue:

foo2hbpl2-wrapper testpage.ps > testpage.prn
hbpl2decode < testpage.prn
lpr -P raw testpage.prn

and now the glow-up version β€” a color ZjStream stream from a Postscript document:

foo2hbpl2-wrapper -c testpage.ps > testpage.prn

πŸ“ FILES πŸ“

  • /usr/bin/foo2hbpl2-wrapper

🧚 SEE ALSO 🧚


🌈 AUTHOR 🌈


and that's the whole page, bestie!! πŸ’– this was the foo2hbpl2-wrapper page from the General Commands Manual, brought to you by Rick Richardson and the fine folks at http://foo2hbpl.rkkda.com/ β€” go forth, convert your Postscript, and slay the print queue. no cap. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from