The K Desktop Environment

Next Previous Table of Contents

3. Usage

3.1 Disclaimer

If you donīt use Postscript for printing (a postscript capable printer or ghostscript), you wonīt need KPriMa!

If somebody reports serious errors or suggests changes I will try to find the time to improve KPriMa. Please send bugreports, suggestions and patches to Torsten Uhlmann

3.2 What PriMa Is Not

KPriMa is not a replacement for:

But some or all of them are needed or helpful to use KPriMa!

3.3 What PriMa Is

Some applications print a document only by calling lpr with some options and will not allow the user to control the process of possible conversion and transformation of the document. If you use KPriMa it will give you the ability to manipulate your document (change papersize, print only selected pages or ranges, print both-sided, rearrange pages etc.), to preview and to send your document to a file, to printers, to mail or fax systems or other programs. All manipulation is done by using the famous psutils by Angus J. C. Duggan. If your document is not in postscript format KPriMa supports conversion by a magicfilter.

KPriMa can be called by your applications instead of lpr or used standalone.

3.4 How Does PriMa Work

First I want to show the differences to traditional, well known lpr-systems.

Traditional Systems

Printing with Linux in simple cases works like shown in the figure.

If you need to convert or manipulate the document before printing, you have to do it yourself or use a magicfilter, that will be called by lpd and works out of reach of the user.

If you want to choose between different options you have to configure a set of logical printer devices (with different filters) for the lpr spool system. Usually thatīs ok, but sometimes you want to change some options, preview, change again, preview again, print to a file, reject the print job or do other things without wasting paper or typing lots of commands.

Since the conversion will be done by the system in the spool area, there may be some external files missing (e.g. EPS- figures in DVI-files). I know there are (more or less working) solutions for this problem, but it is not very comfortable.

Printing With KPriMa

KPriMa will allow you to convert and manipulate your document interactively before you send the job to the printing system. Thereīs no need for the lpd daemon to change the document (besides converting to postscript for non-ps-printers).

Since the output channel of KPriMa can be configured by the user, KPriMa is one comfortable interface for printing, saving, faxing, mailing etc.

You configure a set of logical printers within KPriMaīs configuration file. Each printer consists of a name, a filter command (magicfilter) and a printing command (lpr, mail, fax etc.).

When you select printing or previewing from inside KPriMa, it will use the filter command of the selected printer to convert your file to postscript, will pipe it through some programs of the psutils (depending on the options you choosed) and will then call the previewer or the printing command of the selected printer. This may be a call to lpr (lpr -Pfoo), direct printing to the printer port (cat file >/dev/lp1) or call other programs that will ask for other lpr-printers, for a filename to save to, for a mailaddress or a faxnumber to send to, or (almost) anything you want. There are some examples included (PriMa-Cmd, PriMa-File, PriMa-Mail, PriMa-Fax and PriMa-lpr) to show you how to configure an interface to other programs.

3.5 Restrictions

KPriMa is not able to analyse or change postscript files, all manipulation is done by the psutils. PriMa will use the magicfilter for all files, even if already in postscript format.

Not all of the functionality of the psutils will be used by KPriMa.

Not all combinations of the selectable options will work or will give useful results.

Pagenumbers may not be correct. The manpage for psselect warns:

The page number given to psselect is the number of the page counting from the start or end of the file, starting at one. The actual page number in the document may be different.

Neither KPriMa nor magicfilter are able to convert files standalone, magicfilter will just call the converting programs automatically in the right order. You need to have converters for all file types installed (e.g. a2ps for ASCII, dvips for DVI, pbmtools for various pictures etc.)!

...

3.6 Contributors

Joerg Raedler is the Author of PriMa, the tool which KPriMa is modeled after. He is also the author of most of the documentation you can find here.

3.7 Bye Bye

Changes, suggestions, patches etc. go to mailto:TUhlmann@gmx.de.

Enjoy, Torsten

Next Previous Table of Contents