TurboPrint drivers are integrated into your Linux system in a completely compatible way (creating printer queues in /etc/printcap), so printing works just as with every other Linux printer driver.
From the shell, files can be printed using the "lpr" command:
lpr -Pprintername file(s)
If CUPS is installed on your system, the following alternative print command exists (depending on the Linux distribution the "lpr" command is no longer available):
lp -d printername file(s)
Instead of printer name the short name of the printer must be entered, which is shown in TurboPrint's xtpsetup or xtpconfig setup or configuration tools. The default name for the first printer that is set up by TurboPrint is "tp0". So if you want to print a postscript file named "test.ps", just enter
lpr -Ptp0 test.ps
Another way is to use lpr is to put it at the end of a "pipe" - the output of one command is used as input from lpr. This is useful if a file is formated or converted first before it is sent to the printer.
Examples:
a2ps --output=- textfile.txt | lpr -Ptp0
An ASCII file is converted to a postscript file using the a2ps command. The output is printed by lpr.
For more information on lpr see its man page (man lpr)
.
To print ASCII text files in a certain layout, you can call a2ps or enscript directly. Here are some examples:
a2ps --portrait --borders=0 --columns=1 --no-header --printer=tp0 myfile.txt
enscript --portrait --columns=1 --no-header --printer=tp0 myfile.txt
prints just the text - no borders, one column, no headers.
a2ps --landscape --borders=1 --columns=2 --printer=tp0 myfile.txt
enscript --landscape --borders --columns=2 --printer=tp0 myfile.txt
prints the text in landscape orientation with borders, two
columns per page with headers (filename, page numbers).
For more information on a2ps and enscript see
the man pages (man a2ps, man enscript)
.
Images e.g. in JPG format can be printed directly from command line. Positioning and scaling is done by the CUPS printing system. By default images are rotated if in landscape format and are printed in original size (i.e. the size stored in the image file). If image size exceeds page size several pages are printed.
Image size (in percent of page size) can be specified from command line, e.g.
lp -d tp0 -o scaling=50 filename.jpg
Further options can be found in the CUPS HTML online help - see link below.
If you want to position images exactly or if you want to print several images on one page you can use the application "OpenOffice Draw" - see also section OpenOffice in this chapter.
Many common file types like postscript documents, plain ASCII files or JPG images can be printed directly from command line. If a file format is not supported directly (like some image formats) it must be converted first.
Responsible for correctly discerning the file type is the CUPS printing system - see HTML online help in the CUPS web frontend
If you are
still using the LPR(ng) spooler format conversion is done by
the TurboPrint printer filter "tpfilter"
- for documentation see (man tpfilter)
.
KDE applications show a list of all printer queues on the system. Simply select your printer in this list.
With "Properties" you can reconfigure the TurboPrint driver (resolution, media type, etc.). Please note that the CUPS printing system must be installed for this feature.
In most other applications printing works just like printing from shell: The application programs creates a temporary file with the page(s) that should be printed (usually in postscript format) and starts the lpr or lp command.
In most applications the user can determine whether another print command should be used instead of lpr and which parameters should be used, e.g.
lpr -P tp0
lp -d tp0
(replace "tp0" by the actual name of the printer queue).
Instead of the lpr command you can also enter the command kprinter
.
kprinter opens a window
in which you can choose the printer and make further settings.
To print from the image editor GIMP, click on the image to be printed w ith the right mouse button, then choose "File -> Print...". In the frame "Printer Settings", button "Printer Name" choose the short name of your printer. Set "Media Size" to the desired paper size.
Then click on the "Setup" button.
Choose "PostScript Level 2" as the printer driver. Dont choose any of the manufacturer specific drivers (Epson / HP / ...)! The default in the field command must be slightly changed. Please remove the "-oraw" option. The correct entry is:
lp -s -dprintername
For older versions of GIMP the command line must be changed from "/usr/bin/lpr -Pprintername -l" to
/usr/bin/lpr -Pprintername
In the field "PPD File" you should choose the PPD file for your printer from the directory
/usr/share/turboprint/ppd
Press "OK" to close the "Setup" dialog.
As GIMP prints the picture a bit too bright you should open the Dialog "Adjust Colors" and change the "Gamma" setting to 0.75 and "Saturation" to 1.2. At this point everything is set up correctly for TurboPrint.
Now you can choose the print size and position of the image. Use the "Scaling" slider to change the picture size. The print position can be changed either by moving the black square in the preview or by entering the position in the fields "Left" and "Top". Use "Center Image" to position the image in the middle of the page.
Finally choose "Print" or "Print And Save Settings" to print the picture or just "Save Settings" to save the settings you made.
If you do not get any printout, this may be a result from problems with GIMP's Postscript Leve2 driver (Gimp 1.3, 2.x).
To correct the problem start GIMP from command line as follows:
export LC_NUMERIC=C
gimp
OpenOffice is a powerful office suite. It also includes the application "OpenOffice Draw" which is a good choice for printing photos or CD labels.
Before you print, you should first setup one or several printers - or you use the driver "Kprinter" which is pre-installed in current versions of OpenOffice. Kprinter lets you choose the actual printer driver before printing starts (see section "kprinter" above).
The printer installation tool is started from KDE menu ("OpenOffice.org Printer Configuration") or from shell with the command
/opt/OpenOffice.org/spadmin
(the path may be different - please see the OpenOffice online manual).
In some versions of StarOffice with "Desktop" you can use the icon "Printer Setup" instead:
The setup window:
First you have to add a new printer driver. Choose "New Printer" - the driver selection dialog appears. Choose "Import" and enter the path to the TurboPrint PPD files ("Driver Directory"). The path is by default
/usr/share/turboprint/ppd
Choose the correct printer and click on the "Ok" button. Now the new printer will appear in the list of OpenOffice printer drivers. Choose it again in the printer driver list.
Choose "Next" to continue with the following dialog:
Select the printer queue of your choice (e.g. "tp0") and continue with "Next".
Choose the default page size and orientation. Then set "PostScript Level"="2" and "Color space"="Color". If you're using the CUPS printing system, you also have to choose the print resolution (DPI). Close the dialog with "OK".
Now close the "Printer Setup" dialog - everything is set up.
Open the "Print" dialog with the menu "File" / "Print".
Choose your printer. In the "Properties..." dialog you can change the page size and the color mode, if you want to. With the CUPS printing system you can also change settings like print resolution and print media. Thats it! Just press "OK" to print.
Note: The printout may need much time to process if you have chosen "TrueColor" mode in TurboPrint's xtpconfig configuration menu. You can speed up the printout a lot by choosing "Black & White". Also with the "256 color" or "Grayscale" modes printing speed will be a bit higher.