ipp3dprinter(1)

πŸ“¦ version 0.0.0~git20220215.f365352, in debian bookworm, ubuntu resolute, ubuntu stonking

πŸ’– ipp3dprinter β€” bestie edition πŸ’–

okay so like. this is the manual page for ipp3dprinter, and it lives in section 1 (the "commands you actually type" section, iykyk). it's from Apple Inc. and it is lowkey one of the most fun little tools in the whole CUPS-verse. sit down, grab a boba, we're doing this πŸ’…


✨ NAME ✨

ipp3dprinter β€” an ipp 3d printer application πŸ–¨οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

ipp3dprinter [ --help ] [ --no-web-forms ] [ --version ] [ -D device-uri
] [ -K keypath ] [ -M manufacturer ] [ -a filename.conf ] [ -c command ]
[ -d spool-directory ] [ -f type/subtype[,...]  ] [ -i iconfile.png ] [
-k ] [ -l location ] [ -m model ] [ -n hostname ] [ -p port ] [ -r
subtype[,subtype] ] [ -v[vvv] ] service-name

like. look at her. all those little bracketed options are giving ✨customizable✨ and then service-name is just there at the end, standing on business, no brackets, mandatory. periodt.


🌸 DESCRIPTION 🌸

ipp3dprinter is a simple Internet Printing Protocol (IPP) server that conforms to the IPP 3D Printing Extensions (PWG 5100.21) specification. no cap, that's the whole vibe.

so what's she for?? two things, bestie:

  • testing client software (yes, that's you, little IPP client, get in the test harness)
  • acting as a very basic print server that runs a command for every job that is printed πŸ”₯

that's it. that's the gig. she's simple, she's honest, she runs a command per job. iconic behaviour honestly.


πŸŽ€ OPTIONS πŸŽ€

the following options are recognized by ipp3dprinter β€” every single one, we're listing them ALL because we do not skip. πŸ™ˆ

  • --help β€” show program usage. she's telling you how to use her. communicate! 🫢
  • --no-web-forms β€” disable the web interface forms that are used to update the media and supply levels. like, no forms, no touchy. hands off the supply levels bestie 😭
  • --version β€” show the CUPS version. little flex. πŸ’…
  • -D device-uri β€” set the device URI for print output. the URI can be a filename, a directory, or a network socket URI shaped like "socket://ADDRESS[:PORT]" (and the default port number there is 9100, write that down). when you specify a directory, ipp3dprinter will create an output file using the job ID and name. cute naming scheme, obsessed. πŸ’–
  • -M manufacturer β€” set the manufacturer of the printer. the default is "Example". very placeholder of her, we love a neutral default. ✨
  • -c command β€” run the specified command for each document that is printed. now listen closely because this one has ✨lore✨: if "command" is not an absolute path (/path/to/command), then ipp3dprinter goes looking for the command in the "command" subdirectory of the CUPS binary directory β€” typically /usr/lib/cups/command or /usr/libexec/cups/command. the cups-config(1) command can be used to discover the correct binary directory (cups-config --serverbin). also!! the CUPS_SERVERBIN environment variable can be used to override the default location of this directory β€” see the cups(1) man page for more details. so many ways to find your little command. she's resourceful. 🧚
  • -d spool-directory β€” specifies the directory that will hold the print files. the default is a directory under the user's current temporary directory. it's giving "i made a folder somewhere, don't worry about it". 🌈
  • -f type/subtype[,...] β€” specifies a list of MIME media types that the server will accept. the default depends on the type of printer created. mystery default, main character energy, we respect it. πŸ‘‘
  • -i iconfile.png β€” specifies the printer icon file for the server. the file must be a PNG format image, okay? PNG. not a jpeg, not a webp, bestie. the default is an internally-provided PNG image. πŸŽ€
  • -k β€” keeps the print documents in the spool directory rather than deleting them. she's a hoarder, but make it intentional. πŸ”₯
  • -l location β€” specifies the human-readable location string that is reported by the server. the default is the empty string. she lives nowhere. she is everywhere. πŸ’€
  • -m model β€” specifies the model name of the printer. the default is "Printer". naming her Printer. bold. iconic. no notes. ✨
  • -n hostname β€” specifies the hostname that is reported by the server. the default is the name returned by the hostname(1) command. she's just asking the system who she is, relatable honestly 😭
  • -p port β€” specifies the port number to listen on. the default is a user-specific number from 8000 to 8999. so like, she picks her own little corner of the port range. adorable. πŸ¦‹
  • -r subtype[,subtype] β€” specifies the DNS-SD subtype(s) to advertise. separate multiple subtypes with a comma. the default is "_print". if you want to advertise more than one, comma-comma-comma, bestie. 🌸
  • -v[vvv] β€” be (very) verbose when logging activity to standard error. add more v's for more chaos. -v is a lil chatty, -vvvv is her telling you EVERYTHING. πŸ™ˆ

⭐ EXIT STATUS ⭐

ipp3dprinter returns 1 if she's unable to process the command-line arguments or register the IPP service. basically if something goes wrong at the door, she's out. πŸšͺ

otherwise?? ipp3dprinter will run continuously until terminated. she's not leaving. she lives here now. you have to kill her yourself. main character energy fr fr. πŸ’€πŸ‘‘


🌈 CONFORMING TO 🌈

ipp3dprinter is unique to CUPS and conforms to the IPP 3D Printing Extensions (PWG 5100.21) specification. one of a kind, does not copy anyone's homework, but does follow the spec. periodt. ✨


πŸ’œ ENVIRONMENT πŸ’œ

okay this section is lowkey the coolest part, stay with me:

ipp3dprinter adds environment variables starting with "IPP_" for all IPP Job attributes in the print request. for example!! when executing a command for an IPP Job containing the "materials-col" Job Template attribute, the "IPP_MATERIALS_COL" environment variable will be set to the value of that attribute. so the job info just... walks into your environment. she's handing your command little notes. 🫢

in addition, all IPP "xxx-default" and "pwg-xxx" Printer Description attributes are added to the environment. for example, the "IPP_MATERIALS_COL_DEFAULT" environment variable will be set to the default value for the "materials-col" Job Template attribute. defaults get their own variable. as they should. πŸ’…

enumerated values are converted to their keyword equivalents. for example, a "print-quality" Job Template attribute with a enum value of 3 will become the "IPP_PRINT_QUALITY" environment variable with a value of "draft". so 3 becomes "draft" β€” glow up of the century honestly. this string conversion only happens for standard Job Template attributes, currently "finishings" and "print-quality". just those two. no others. don't come for her. 😭

finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, and the "DEVICE_URI" environment variable contains the device URI as specified with the -D option. yes, that -D from earlier. they're connected. it's a whole ecosystem. 🌸


πŸ–¨οΈ COMMAND OUTPUT πŸ–¨οΈ

unless they communicate directly with a printer, print commands send printer-ready data to the standard output. that's the flow. stdout is for the goods. ✨

print commands can also send messages back to ipp3dprinter on the standard error, and they do it with one of these prefixes β€” learn them, they're the whole vocabulary:

  • ATTR: attribute=value[ attribute=value] β€” sets the named attribute(s) to the given values. currently only the "printer-alert" and "printer-alert-description" Printer Status attributes can be set. that's the list. that's the whole list. πŸŽ€
  • DEBUG: Debugging message β€” logs a debugging message if at least two -v's have been specified. so one v isn't enough for debug. you need the double v. 🫢
  • ERROR: Error message β€” logs an error message and copies the message to the "job-state-message" attribute. she's telling you AND writing it down. receipts. πŸ’€
  • INFO: Informational message β€” logs an informational/progress message if -v has been specified and copies the message to the "job-state-message" attribute unless an error has been reported. if an error already happened, the info message doesn't get copied. error wins. as it should. πŸ‘‘
  • STATE: keyword[,keyword,...] β€” sets the printer's "printer-state-reasons" attribute to the listed keywords. full replace, bestie. πŸ”₯
  • STATE: -keyword[,keyword,...] β€” removes the listed keywords from the printer's "printer-state-reasons" attribute. the little minus sign is doing so much work here. πŸ™ˆ
  • STATE: +keyword[,keyword,...] β€” adds the listed keywords to the printer's "printer-state-reasons" attribute. and the plus adds. symmetrical. beautiful. πŸ’–
note the difference bestie: no sign = set (replace everything), - = remove, + = add. three little moods. πŸ¦‹

🧚 EXAMPLES 🧚

run ipp3dprinter with a service name of My Cool Printer:

ipp3dprinter "My Cool Printer"

run the file(1) command whenever a job is sent to the server:

ipp3dprinter -c /usr/bin/file "My Cool Printer"

see how she just... runs file on every job? that's the whole serve-a-command-per-job fantasy, live and in colour. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp)


Copyright Β© 2007-2019 by Apple Inc.


so yeah!! that's ipp3dprinter, your tiny little IPP 3D printing bestie. this edition of the manual page is from 26 September 2019, and it ships with CUPS. go forth, spin up a server, run a command per job, and stay hydrated. mwah πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from