Printer Configuration with Overlays
This is a generic description of how to setup printers for use in control.
Printer Configuration
Firstly you should setup a printer through cups/printconf or another tool available on the system.
(Examples are for CUPS)
If you are using overlays ensure that.
A. The 'device' is set to "raw".
B. 'The model' is "Raw Queue".Otherwise attempt to select the device manufacturer from a list, and match it to its model. If the necessary driver isn't listed, check CUPS's compatibility with your printer and attempt to find alternate drivers. eg(gimp-print, or from the manufacturer).
After your printer is configured, try printing a test page.
In CUPS or redhats printconf, just select print test page when you have selected the printer or if your on the command line:
lpr -P 'Printer Name' 'File name'
Once your printer is printing to your satisfaction continue on to configuring control.
Configuring Control
Adding a Printer to Control
Tto add the printer to control go to the command line and run 'prnaad' and select '1 ADD'
Code:
prnaad
Then you will be taken to a screen where you can enter your printer details
Short printer name..... : 'Some name you can remember'
This is the name you want control to reference the device by, it can be any name you want, but its better to select something meaningful.
System printer name.... : 'Printer Name'
This is the name you chose for the printer during configuration, it has to match that name exactly.
eg:
Printer description.... : A description of your printer
A short description of the printer, or its functionality.
Text printer? (y/n).... :
This option depends on controls setup and the printers capabilities. If you are using only console based applications then this must be "Y", as the conversions to output postscript are handled by qt. If your using the gui version of control and your printer is capable of printing postscript then its safe to choose "N" here.
Printer type........... :
This option allows control to send the correct escape sequences to a printer when it generates output. This includes things like page breaks, or resets. When selecting options here it is important to choose the correct options for different printers so that docket, and desktop printers behave correctly. For a full listing of sequences look in
inprint.c
NB: When using overlays you should select "32, Single Page Printer".
Formfeed at report end. :(Y/N)
This option differs for different printers, so if at the end of printing a formfeed might be sent depending on this option
Pre-printed stationary. :(Y/N/ )
This option specifies if the printer is using paper that already has some data printed on it. This is necessary for programs in control to determine if to include some formatting, and headings on their output. It is necessary for overlays.
Force orientation (l/p) :
Forces a printer to use landscape or portrait orientation.
Special printer options :
When using graphical mode this option allows for the user to determining if a popup appears prompting the user for options.
Selecting Printers for Reports
This is a relatively simple step, once the printer is working and added to control, all that is left is to select it as the default printer for use by different programs. To change the printer defaults for each program run the following command and go to the second page and select the relevant report.
teaad
Overlays
If you wish to use an overlay in with your printer, the following needs to be done.
This is only applicable for CUPS, but the config is similar on older unix systems.
Copy the script that performs the overlay, into cups's interface directory, and make sure its name is identical to the printers name
/etc/cups/interfaces/
Make sure the script is executable by the cupsd, its probably best to make it executable by everyone, but only editable by root.
chmod 755 /etc/cups/interfaces/printer-name
Run the script with some test data and verify the results
/etc/cups/interfaces/printer-name < data.txt
Once the script itself has been confirmed to work, then control should not print data with this overlay.
Troubleshooting Overlays
- Ensure that the permissions and ownership of the file are correct.
- If there is a file in the ppd directory with the same name, delete it
- Did you restart cups after adding the overlay?
- Run Away, and never come back.
rm /etc/cups/ppd/printer-name
