CAPS Universe documentation  1.0.4
All you need to know to be successful
capsdoprint

Convenience tool to print a document from the command line in a CAPS universe manner.

This command line tool is a frontend to make use of features of libcapsclient. If you want to use this command in your console, just do it.

Note
A backward compatible variant of this command is lpr
Attention
Developers! If you want to use this command from within your application, don't do it. Use libcapclient instead. Really. Refer Client side API description for details.

Usage:

$ capsdoprint [options] [file]
  • file can be a document's file name
    • Skipping document's name means 'stdin' will be used instead for the document data
  • Options are:
    • -d <name> / --device=<name> The printer to be used.
    • -p <params> / --params=<params> Printing parameter (IPP style).
    • -r / --report Report printing progression until done.
    • -v / --verbose Increase verbosity by one. Can be given more than once.
    • --version Print program's version
    • -h / --help Shows short usage help text.
Note
IPP style means space separated strings. See below.

If you have only one printer attached and known by your host, you simply can print a whole document with:

$ capsdoprint this_document.pdf

If you want to see the printing progression, just add the --report parameter

$ capsdoprint --report this_document.pdf

In this case the command continuous to run and prints the printing progression and terminates when the document is finally printed.

If more than one printer is known to the system, you must define the printer to print the document on.

$ capsdoprint --device="some printer name" this_document.pdf

Defining the printer this way implies you know their names. Refer capsprinter how to retrieve their names.

Note
There is no such thing like a default printer.

If you want to print in a special way, you can add so called printing parameters with the --params parameter. This parameter accepts key strings or key=value string pairs, each defining a special part of the printing process, based on the key string.

$ capsdoprint this_document.pdf --params="page-ranges=4-8,10 input-tray=top quality=4 sides=one-sided copies=1"
Note
More than one key and/or key=value pair must be separated by spaces. Thus, you will need to quote the value part of this parameter, like –params="key1 key2=val2"
You can find here a list of supported printing parameters.

Refer caps_cl_job_commit() for the used internal function to commit a job.