ipptool(1)

πŸ“¦
version 2.4.19 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ipptool β€” perform internet printing protocol requests πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about ipptool, the OpenPrinting icon that goes and talks to printers for you. she's giving main character energy in the CUPS universe and honestly? obsessed. πŸŽ€


✨ SYNOPSIS ✨

ipptool [ --help ] [ --ippserver filename ] [ --stop-after-include-error
] [ --version ] [ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -P
filename.plist ] [ -S ] [ -T seconds ] [ -V version ] [ -X ] [ -c ] [ -d
name=value ] [ -f filename ] [ -h ] [ -i seconds ] [ -j ] [ -n repeat-
count ] [ -q ] [ -t ] [ -v ] printer-uri testfile [ ...  testfile ]

🌸 DESCRIPTION 🌸

So here's the vibe. ipptool sends IPP requests to the printer-uri you hand it, and then it tests and/or displays the results. That's the whole job, and she does it flawlessly. πŸ’…

Each named testfile defines one or more requests β€” including the expected response status, attributes, and values. Like, a whole checklist of what should happen, and ipptool is the girl with the clipboard making sure it actually happened.

The output? You can get a plain text, formatted text, CSV, or XML report on the standard output. And the drama of it all: a non-zero exit status means one or more tests have failed. 😭

Oh, and if you want to know how to write a testfile? That's a whole other lore drop β€” the testfile format is described in ipptoolfile(5). iykyk. πŸ“–


πŸ‘‘ OPTIONS πŸ‘‘

The following options are recognized by ipptool:

  • --help β€” shows program help. that's it, that's the girl. 🫢
  • --ippserver filename β€” says the test results should be written to the named ippserver attributes file. so instead of just vibing on your screen, they go into a file. ✨
  • --stop-after-include-error β€” tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive, but this one says "no bestie, we're halting right here." πŸ›‘
  • --version β€” shows the version of ipptool being used. know your queen's era. πŸ’–
  • -4 β€” specifies that ipptool must connect to the printer or server using IPv4.
  • -6 β€” specifies that ipptool must connect to the printer or server using IPv6.
  • -C β€” specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. so this is the "actually conform, bestie" flag. πŸŽ€
  • -E β€” forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. security slay. πŸ”’
  • -I β€” specifies that ipptool will continue past errors. she's forgiving like that. πŸ™ˆ
  • -L β€” specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
  • -P filename.plist β€” specifies that the test results should be written to the named XML (Apple plist) file in addition to the regular test report (-t). ⚠️ heads up: this option is incompatible with the -i (interval) and -n (repeat-count) options. pick a lane, girl. πŸ’€
  • -S β€” forces (dedicated) TLS encryption when connecting to the server. πŸ”₯
  • -T seconds β€” specifies a timeout for IPP requests in seconds. clock's ticking bestie. ⏰
  • -V version β€” specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. yes, 1.1 is the default, she's a classic. 🌈
  • -X β€” specifies that XML (Apple plist) output is desired instead of the plain text report. ⚠️ also incompatible with the -i (interval) and -n (repeat-count) options. not me trying to do both… don't. 😭
  • -c β€” specifies that CSV (comma-separated values) output is desired instead of the plain text output. spreadsheet girlies rise. πŸ“Š
  • -d name=value β€” defines the named variable. name equals value, simple as. ✨
  • -f filename β€” defines the default request filename for tests. your fallback fave. πŸ’œ
  • -h β€” validate HTTP response headers. make sure those headers aren't lying to you. πŸ”
  • -i seconds β€” specifies that the (last) testfile should be repeated at the specified interval. ⚠️ this option is incompatible with the -X (XML plist output) option. also note: it's the (last) testfile that repeats, okay? πŸ¦‹
  • -j β€” specifies that ipptool will produce JSON output. for the devs who speak fluent JSON. 🌸
  • -l β€” specifies that plain text output is desired. (yes she's in the options list even though she's lowkey hiding from the synopsis β€” we still love her.) πŸ₯°
  • -n repeat-count β€” specifies that the (last) testfile should be repeated the specified number of times. ⚠️ this option is incompatible with the -X (XML plist output) option. loop it, queen. πŸ”
  • -q β€” be quiet and produce no output. silent but deadly (in the good way). 🀫
  • -t β€” specifies that CUPS test report output is desired instead of the plain text output. πŸ“
  • -v β€” specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output. so much detail, we love to see it. πŸ‘‘

πŸŽ€ EXIT STATUS πŸŽ€

The ipptool program returns 0 if all tests were successful and 1 otherwise. that's the whole mood ring β€” 0 = we ate, 1 = something's off bestie. πŸ’–


πŸ¦‹ FILES πŸ¦‹

The following standard files are available:

color.jpg
create-printer-subscription.test
document-a4.pdf
document-a4.ps
document-letter.pdf
document-letter.ps
get-completed-jobs.test
get-jobs.test
get-notifications.test
get-printer-attributes.test
get-subscriptions.test
gray.jpg
ipp-1.1.test
ipp-2.0.test
ipp-2.1.test
ipp-2.2.test
ipp-everywhere.test
onepage-a4.pdf
onepage-a4.ps
onepage-letter.pdf
onepage-letter.ps
print-job.test
print-job-deflate.test
print-job-gzip.test
testfile.jpg
testfile.pcl
testfile.pdf
testfile.ps
testfile.txt
validate-job.test

🌈 CONFORMING TO 🌈

The ipptool program is unique to CUPS and conforms to the Internet Printing Protocol up to version 2.2. she's one of a kind and standards-compliant, the duality. ✨


πŸ’… EXAMPLES πŸ’…

Get a list of completed jobs for "myprinter":

ipptool ipp://localhost/printers/myprinter get-completed-jobs.test

Send email notifications to "user@example.com" when "myprinter" changes:

ipptool -d recipient=mailto:user@example.com \
    ipp://localhost/printers/myprinter create-printer-subscription.test

see how easy that was?? iconic behaviour fr fr. 🫢


πŸ”₯ SEE ALSO πŸ”₯

ipptoolfile(5), IANA IPP Registry (https://www.iana.org/assignments/ipp-registrations), PWG Internet Printing Protocol Workgroup (https://www.pwg.org/ipp) RFC 8011 (https://datatracker.ietf.org/doc/html/rfc8011),


Copyright Β© 2020-2024 by OpenPrinting.


and that's the whole page bestie!! this gorgeousness is from the CUPS manual, dated 2021-10-20 β€” go forth and test those printers, you've got this. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from