tree: 6bb5b8e03fb9628ae01bac39863f06fd86b8f073 [path history] [tgz]
  1. BUILD.gn
  2. CPPLINT.cfg
  3. DIR_METADATA
  4. helpers.cc
  5. helpers.h
  6. helpers_test.cc
  7. ipp_in_json.cc
  8. ipp_in_json.h
  9. ipp_in_json_test.cc
  10. OWNERS
  11. printer_diag.cc
  12. README.md
print_tools/README.md

print_tools: various tools related to the native printing system

printer_diag

This tool sends to a given printer (or other IPP endpoint) Get-Printer-Attributes request and returns the received response. The response is parsed and can be saved both as JSON file or as a raw binary file.

printer_diag is included in every ChromeOS image but you can access it only in development mode. It may be run on the device from the console level:

printer_diag --url "ipp://example.org/printer" --version=2.0 --jsonf=out.json --binary=out.raw

In this example, the IPP Get-Printer-Attributes request is sent to the given URL. The version of IPP protocol is set to 2.0 (default is 1.1). Obtained response is dumped to a binary file out.raw (optional). The response is also parsed and saved in JSON format to a file out.json (optional).

Run the program with --help parameter to get more details.