Output Devices

Top  Previous  Next

When jobs are received by the server and delivered to a remote location, the output is delivered to a remote device, a term used somewhat loosely. A remote device is a printer, file, or command line, or file viewer that is printed to, copied to, or executed when a job's data is delivered.  In the case of a browser client, there is one "device" -- just the browser itself.

 

An autosend output is automatically configured for each system client location.  This moves files from the server's "autosend/companyID/locationID" path to the client's "autosend/server" path.

 

The initial page is a list of known device ID's, grouped by location.  From this page, you can select a device to edit, or add a new device by pressing the Add button.

 

devices

 

Location ID is the location of the device.  For example, there will be printer devices defined for a specific office.  Locations are defined in the Locations/Users page.

 

Device ID is an identifier for this device at the location specified.  It must be unique for the location.

 

Description is an information field.

 

Target Type defines the type of device.

Printer
File
Command
Viewer
Network Printer

 

Target defines the value of the device, such as the printer name, or a file name, or command line.

 

A Printer device is a print spooler destination on the remote system.  In Windows, it is the printer name (not the share name).  In Linux, this is a CUPS destination name, and the system client sends the job to the printer with the command "lp -dname -oraw".

 

A File device creates a file on the remote system.  The value will typically be a path with substitution parameters used to generate a file name.  For remote location clients running Unix or Linux, the file may start with | or > to send the file to a command rather than the file system.  For example, to print to a spooler destination named "hp4000" on a different host, device might be: '|lp -dhp4000 -oraw -h psvr1".  On Windows, this can also be the name of a shared printer, such as \\Server\Printer1.

 

A Command device runs a command line defined as the value.  The command line will contain one or more substitution parameters so the command can operate on the delivered data file.

 

A Viewer device creates a work file and uses the operating system facilities to display the document.  Note that the system client cannot be running as a service or in background for this to work.  Viewer devices do not need a specific target name, as the system client will create a work file dynamically.

 

A Network Printer value is an IP address or hostname, with an optional :port suffix.  The default port is 9100, which is what printers with network interfaces normally listen on.

 

Format is a specification of print language formats that the device supports.  If a job arrives that is in one of these formats, then it is sent to the device unchanged.  This both saves time and prevents loss of print job features, such as duplex or tray control.  If a different format arrives, then a conversion is attempted to the most efficient format the device supports.  For example, if a PDF file arrives and a device supports PCL6 and Color PCL6, a conversion will be attempted to PCL6.  LIkewise, especially for browser users, if a Postscript file arrives, it is converted to PDF.

 

Conversions generally require that Ghostscript be installed on the CirrusPrint server or remote system client.  If the job submission format is PDF, the system will prefer to use a client-side Ghostscript to save transmission time and server process overhead.

 

A special format called "Remote print driver" allows submitted PDF file to be printed at a remote location using the client system's native print drivers.  On Windows clients, this requires that Ghostscript be installed on the remote system client.  On Linux clients, the system assumes that the spool system queue is configured with a driver model and will convert the PDF file properly.

 

Another tool, GhostPCL, can be used to convert PCL5 and PCL6 to other formats.

 

If the device is a printer or network printer type, and a conversion to a specified format fails, the job is discarded to avoid sending unprintable data to the printer.  If images arrive, Image Magick can be used to pre-convert the image to PDF, then a second conversion is performed to the desired format.

 

Note that when conversions are performed, printer-specific features like duplex and try control is typically unavailable.

 

Filter is a command line that can be run to pre-process incoming documents before they are parsed and delivered to the output device.  A filter can be used to convert a document to a more usable format, or to enhance or otherwise process a document for any purpose.  Filters are executed before the format of the file is determined by CirrusPrint.  The result of the filter is used in place of the original document.

 

The command line must be complete and valid for the system where the CirrusPrint server runs.  There are three substitution tokens used in the command line:

 

%i (required) is replaced with the incoming document file name, as stored when the job is received
%o (required) is replaced with a work file name, and once created, it will replace the incoming document file
%e (optional) is replaced with a work file name that can store an error message generated by the command

 

CirrusPrint executes the command line after replacing these tokens with file names.  If there is an error running the command, or any message in the error file, the message is logged and the job is discarded.  If there is no error, then the output file replaces the incoming document file and processing of the job continues with this new file.

 

One such filter could be another SDSI product, UnForm, which can process PDF, PostScript, XML, and text files to create enhanced documents, doing things like adding images, barcodes, or attachments, or generating print documents with controls for duplex or tray selection.  Here is an example using an UnForm command line that would create a PostScript print file from a document sent to CirrusPrint, enhancing it with commands in the rule file acme.rul:

 

uf90c -i "%i" -o "client:%o" -e "%e" -p ps -f acme.rul

 

The command will run an UnForm job, supplying as input the incoming document that CirrusPrint received, and creating an output file that will be sent to the output device.  Note the client: prefix to the output file name is an UnForm-specific option that forces its output to be stored by the UnForm client rather than the UnForm server.  Other filter programs may have their own nuances that must be understood when specifying the filter command line.

 

 

Substitution Parameters

 

The following parameters are available in the Target value field.  Some parameters are most applicable in File type devices, and some are available only from local path sources or from local port sources.  In addition to these fixed parameters, there are soft parameters that can be supplied by an application that performs local path transfers.  See notes about soft parameters below.

 

To reference a substitution parameter in a device value, use its name in curly braces.  For example, to specify a file path based on the server, date and time, a sequencer, and a file extension, a value could look like this: /data/arc/{server}-{ymd}-{hh}{mm}-{#}.{ext}

 

file is the name of the client-side work file.  This is helpful with command type devices, where the name of the job file is needed for a command line program.
errfile can be used in command type devices.  It refers to a dynamically generated file whose contents can contain error messages.  If this file has content after the command is executed, the error message content is logged on the client and also at the server in job history.  In addition, the job is retained on the client to retry a short time later.
respfile can be used in command type devices. It refers to a dynamically generated file whose contents can contain information messages that are logged on the client and also at the server in job history.  This information could be used, for example, to identify a spool job number in job history.
yyyy is the current 4-digit year
yy is the current 2-digit year
mm is the 2-digit current month
dd is the 2-digit current day of the month
hh is the 2-digit current hour in 24-hour time
mn is the 2-digit current minute
ss is the 2-digit current second
ymd is the same as {yyyy}{mm}{dd}
jobid is the job ID number
server is the server hostname or address the client received the job from.
# a unformatted file sequence number, used to guarantee uniqueness when File type output is specified.
##, ###, ####, ##### a zero-filled, 2 to 5 digit sequence number, used to guarantee uniqueness when File type output is specified.  If the sequencing required exceeds the digits allowed, an unformatted sequence number results.
temp is a temporary directory for workfiles, from environment variable TEMP on Windows, or the user's home .cp10/tmp path on Unix.
type is the file type, suitable as a file extension.

 

On Windows clients, the following symbolic folder names are also available:

desktop for the running user's Desktop folder.
commondesktop for the Desktop folder for all users.
documents for the running user's Documents folder.
commondocuments for the Documents folder for all users.

 

 

The following parameters are also available if the job arrived from a path source.

 

filename is the source file name, without a directory path.
path is the directory path, with a trailing slash, of the source file.
basename is the source file name, without a directory path or extension.
ext is the file extension of the source file name.
owner is the Unix or Linux owner name of the source file.
group is the Unix or Linux group name of the source file.

 

 

The following parameters are also available if the job arrived from a port source.

 

fromip is the IP address of the machine that printed to a source port.
port is the source port number.
ext is an inferred file name extension based on the content of the print data that was received by the source port, such as "ps", "pcl", or "pdf".

 

When a job is not submitted from a path source, the job title is used as the filename parameter, and the basename will be that value with any ".text" suffix removed.  In addition, any slashes are replaced with spaces to avoid interpretation as a full path.

 

Soft Parameter Substitution

Soft parameters are supplied via an INI file associated with the local path file (path.ini), in an [info] section with name=value pairs.  For example, if a file 12345.pdf is placed in a monitored path, a file 12345.ini could be placed there as well, and any name/value pairs in the file's [info] section will be transferred to the remote clients. Any {name} string found in the device's value field will be replaced with its value.

 

Protected Directories

To prevent accidental destruction of important system information, all files must contain at least two directory delimiters, and the following directories are protected and can't be written to:

 

Unix:

The root / directory
The /etc/ directory
Any directory containing /bin/
Any directory containing /sbin/

 

Windows:

The Windows (%systemroot%) directory
The Program Files or Program Files (x86) directories

 

License Limit Notification

If you create or enable a device so that more devices are configured than licensed, the system will display an error message.  If this occurs, check the Inactive box and save the record, and then either set an unused device to Inactive (or remove it), or increase the license count to allow more devices.