Skip to content

Administrate the Printers


The printers in a PLOSSYS 5 system can be administrated via PLOSSYS CLI.

Hint - Web user interface

Some of the operations can be executed via PLOSSYS Administrator as well.


Requirements

For the requirements for using PLOSSYS CLI, refer to PLOSSYS CLI.


Options

Specific PLOSSYS 5 Server

For administrating the printers of a specific PLOSSYS 5 server, specify the --server <plossys_server> option. Default is https://localhost:8080.

plossys printer <command> --server https://<plossys_server>:8080

Example - show all printers of the plossys.server1.com server

plossys printer show --server https://plossys.server1.com:8080

Self-Signed Certificates

Specifying the --insecure option, you avoid that the certificate will be checked by the client.

plossys printer <command> --insecure

User Authentication

Depending on the type of user authentication activated for the seal-rest service, you have to specify the user and the password with PLOSSYS CLI. By default, the specified user is first checked via OpenID Connect and via basic authentication as fallback.

plossys printer <command> --auth <auth_type> --user <user> --pass <password>

Example - show all printers as user test authenticated via OpenID Connect

plossys printer show --auth oidc --user test --pass test

Using OpenID Connect, you can alternatively specify a JSON Web token (JWT) instead of a user and his password.

plossys printer <command> --auth oidc --bearer <jwt>

Example - show all printers as a user authenticated via JSON Web token

plossys printer show --auth oidc --bearer eyJ0eXAiOiJKV1QiLCJhbG...

The credentials, that means user and password or the token, can also be contained in a credential file which is specified with PLOSSYS CLI.

plossys printer <command> --auth oidc --credential <credential_file>

Commands

Show All Printers

plossys printer show

Show Specific Printers

plossys printer show <printer_name_1> <printer_name_2> ... <printer_name_n>

Show Specific Fields for Printers

plossys printer show --fields <field_name>

Example - show the connection data

plossys printer show --fields "config/connection"

Pause Specific Printers

plossys printer pause <printer_name_1> <printer_name_2> ... <printer_name_n>

Resume Specific Printers

plossys printer resume <printer_name_1> <printer_name_2> ... <printer_name_n>

Delete Specific Printers

plossys printer remove <printer_name_1> <printer_name_2> ... <printer_name_n>

Redirect a Printer

plossys printer redirect <source_printer_name> <target_printer_name>

Set Printer Message

plossys printer set-message <printer> <message>

Remove Printer Message

plossys printer remove-message <printer> <message>

Export the Configuration of a Specific Printer

plossys printer export <printer_config_file>.yml <printer_name>

Example - minimum printer configuration

printer: hp4050
connection: 'socket://194.49.3.130:9100'
server: spooler1
webUrl: 'http://194.49.3.130'

Caution - file extension

The standard PLOSSYS 5 driver templates come with a printer configuration file in yml.in format. Files in yml.in format can be used for importing the printer configuration. They will be internally converted into yml format before being uploaded to PLOSSYS 5.

PLOSSYS CLI recognizes the format by the file extension. In case of the yml.in file extension, the file will be converted.

When exporting a printer configuration to a file, the file always has the yml format. An automatic conversion from yml into yml.in is impossible.

If you export a printer configuration in order to modify it and import it again afterwards, do not give the export file the file extension yml.in, as you might expect if you worked with a yml.in file from a driver template before. Otherwise, an erroneous conversion would take place when you re-import the modified file. In most cases, the import would still work without an error, but PLOSSYS 5 would send erroneous jobs to the printers.

For the printer configuration export, always use file names with the yml extension!


Import a Printer Configuration File

plossys printer import <printer_config_file>.yml

Caution - allowed characters

The printer name must not contain UTF-8 or apostrophes. Although the printer will be imported, jobs cannot be processed via this printer.

Hint - printer not deleted

New printers are added. Existent printer configurations are overwritten with the new configuration data. The printer configurations already stored in PLOSSYS 5 are not deleted.


Validate a Printer Configuration File

plossys printer validate <printer_config_file>.yml

Example - valid printer configuration file

plossys printer validate valid.yml

results in

+ Successfully validated configuration from valid.yml.

Example - invalid printer configuration

plossys printer validate invalid.yml

results in

! Syntax of config file invalid.yml is invalid.
! bad indentation of a mapping entry at line 16, column 6:
     - name: PJL Enter Language Posts ...

Hint - more options

For information about the additional options with validating a printer configuration file, execute:

plossys printer validate --help

Advanced Printer Queries

For advanced printer queries, the query command is available. The query command supports the OData language. The result of the command is always a list of printers. In order to execute complex queries and operations, this list can be combined with other PLOSSYS CLI commands.

Example - list the active printers

plossys printer query "runtime/status eq 'active'"

Example - pause the active printers

plossys printer query "runtime/status eq 'active'" | plossys printer pause -

Example - show all printers whose names begin with odm

plossys printer query "startswith(_id,'odm')" | plossys printer show  -

Back to top