PrintCustomResponse

Configuration file

./conf/samples/print.properties

Class name

com.ebd.hub.datawizard.util.PrintCustomResponse


This class is deprecated.

It should therefore no longer be used for new developments. However, it will continue to work for existing processes.

For new developments, please check whether your printer supports reception via protocols such as FTP or can receive the data in another way. Alternatively, a printer can also be addressed via the command line using the class SystemCallResponse. If none of this is possible, the class can still be used by entering the full class path ("com.ebd.hub.datawizard.util.PrintCustomResponse") or by deactivating the "DisableDeprecatedClasses" option in configuration file ./etc/startup.xml. However, support can no longer be provided in this case.

Description


This class allows printing files of the format selected in parameter "data" ("pdf", "postscript", etc.), but only if the printer supports the chosen format). Important note: This class is only meant for local printers (printer installed on Integration Server computer) and not for network printers!

Note: PDF files can either be created via an Integration Unit or received as content "as received". If you have to choose an encoding, it should be "raw data" because the data is binary.

Note: If the trace for phase 6 of a profile using this custom class is activated, all the printers 'visible' to Lobster Integration are written into the detail log of a job.

Parameters


It is possible to define the path to a configuration file in the field "Additional parameters" or define parameters directly which overwrite the default settings. If more parameter should be overwritten directly they have to be separated by a semicolon (;).


Parameter

Default value

Description

color

false

Colour. Allowed values are true and false.

copies

1

Number of copies (1…9999).

data


Print type. Allowed values are plain-text, pdf, pcl, postscript, gif, jpeg and png.

duplex

false

Duplex support (double-sided printing), allowed values are true and false.

errorcsv


Relative path to an additional error file in CSV format. An entry is generated when a printer error occurs and if the path begins with ./ and the parent directory exists.

logtimes

false

Advanced logging for time consumption. The option "Trace messages" has to be set in the logging configuration for phase 6.

mediasize

A4

Page layout. Allowed values are A0A5, B4, B5, B6 and Letter.

mediatray

main

Paper tray. Allowed values are top, bottom, middle, envelope and main.

moveHorizontal

0

This option allows the document to be moved horizontally on the printer. The specifications are to be made in pixels as an integer, negative values are possible. Example: With moveHorizontal=150 the document is moved 150 pixels to the right.

orientation

portrait

Page orientation. Allowed values are portrait and landscape.

pdfemulate


(true or false) If true and data=pdf, an experimental additional function is used to render PDF documents as graphics. This option is intended to print PDF files created by the same Lobster Integration instance (in particular, only the fonts available in this Java runtime are supported) on a simple (inexpensive) non-PDF printer.

Important note: If true, images in the PDF consume a lot of processing power (for converting the PDF images into the images required for the printer spooler) and therefore lead to long processing times.

printer


Name of the printer to be used. The default printer of the system can be defined with value §default§.

If the system property hub.datawizard.emptyPrintnameException is false, an unset value for printer will not cause an error, but the class will not print either. If the system property is true, an empty value for printer causes an error.

quality

normal

Print quality, allowed values are draft, normal and high.

scale

100

With this option the document can be scaled. Possible values: 10 - 200 . Example: scale=50 reduces the document size to 50%.

Example


./conf/samples/print.properties
#
# sample file for print response
#
# Supported keys are: quality, copies, mediasize, orientation, mediatray, color, printer, data
#
# quality = draft | normal | high
# default is normal
#
# copies = 1...9999
# default is 1
#
# mediasize = A0...A5, B4, B5, B6, Letter
# default is A4
#
# orientation = portrait | landscape
# default is portrait
#
# mediatray = top | bottom | middle | envelope | main
# default is main
#
# color = true | false
# default is false
#
# printer = name of printer to use
#
# data = plain-text | pdf | pcl | postscript | gif | jpeg | png

Error entry in file "errorcsv"


For the individual handling of printer problems, an entry can be written to a CSV file in the event of an error, which is picked up and processed by a different profile, for example. For each error job, an entry with a fixed CSV structure is created, as described below. To do this, the property "errorcsv" must contain the relative path to this file, which must start with ./ and the parent directory must exist. If the file does not exist, it will be created. If it already exists, the new entry is attached as a CSV line. If the entry could be written and the option "Custom" is activated in the log configuration for phase 6, a message is inserted into the job log containing the file path of the "errorcsv" file.

Format of a CSV line


"printerName", "timestamp", "JobNr", "PosOfResponse", "[messageList]", "Exception", "ProfileName"


Note: All actual field values are output with double quotes, as shown above.


By evaluating this file in another profile, an individual notification of the person responsible for the printer and an automatic suspension of the jobs is possible in case of unavailability or errors in the printer. The corresponding evaluation profile must be developed by the user.

Note: If this file is created, it should also be processed and deleted by a profile, otherwise the file will grow permanently.