GTKPSPROC, a GTK2-frontend for PSUTILS


GtkPSproc is a front-end for the PSUTILS. PSUTILS are a set of little programs that allows to manage in a lot of ways your PostScript files.

GtpPSproc is designed to work from nearly all programs that call LPR, acting as an intermediary between the program and LPR program.

GtkPSproc allows to adjust all the programs to your printer type (for example, sending always the pages in reverse order), to group two or more pages in a sigle sheet, to print booklets, and to easily print in double-side fashion.

Installing GtkPSproc

You can install the pre-compiled version just entering in your system as root and typing

     ./install

from the command line, or recompile it from source code just entering in the devel folder and typing:

     rm src/gtkpsproc
     ./autogen.sh
     cd src
     make
     cd ..

After recompiling it, just enter as root and install it just by typing:

     ./install

Using GtkPSproc

GtkPSproc can be used in two ways: from command line and from a program. It can receive the .PS file from the command line or from the standard input, to allow to put it in place of LPR.

If you want to use it from command line, just call it this way:

     gtkpsproc FILE.PS

where FILE.PS is the postscript file you want to proccess.

The first time you run GtkPSproc you will receive a message adverting that you must configure GtkPSproc for your printer. This is the configuration dialog:

You can't choose the print options directly, because there's a more easy way to choose them. Acording to the paper feeder that has your printer, you have to choose the right icon on the top, and the right invert options will be selected. To do this, just look at your printer and the way it takes the paper, prints it and sends it out, and choose the icon that has the red/green arrow with the same path (and having in mind that the green side means the printed side, and the red side means the non-printed side of the paper). The three possibilities are:

Canon/Epson style: this icon configures GtkPSproc to work with a lot of inkjet printers, like Canon, Epson, Lexmark... and many more that takes the paper in the way specified there.

HP style: this icon configures GtkPSproc to work with HP inkjet printers and others that uses the same paper feeder.

Laser style: this icon configures GtkPSproc to work mainly with laser printers. If you see with care the icon you will see that the path is the same than in the HP style, but there's a diference: in theses printers, the internal side of the paper is where the letters/graphics are printed, while in the HP style them are printed in the outside.

It's possible that none of the three possibilities adapts to your printer, so you can choose the icon with the hand. In this case, the print options became sensitive and you can choose the parameters for your printer. The Print pages in reverse order means, if active, that the pages must be sent from last to first when the user choose to print in single-side. The print odd pages in reverse order and print even pages in reverse order means the same, but only when the user wants to print in double-side mode. This configuration is made to be sure that the papers can be put again in the tray without the need of reordening before.

And remember that, when printing in double-side mode, the odd pages are sent first, and then the even pages (after waiting for the user to insert the odd pages in the tray, of course).

The option Margin to add when grouping pages defines the margin (in 1/72 inchs) that GtkPSproc have to add when it groups two or more pages into one paper sheet. This is a must, because is very probable that the printer can't print up to the bottom of the page, so if the margin is 0, there will be a little part of the page that will not be printed. The margin size depends of your printer, but if it can print up to one centimetres from the bottom (like my Canon BJ-200ex), then you can try with 8. If it can print only up to two centimetres, then try with 16. If you have a laser printer, you can try with 3 or 4, because theses printers can print in nearly all the paper's surface.

After doing this, you can press OK. The configuration will be saved and you will see the main window:

Here you can choose how you want to print the file.

You can choose how many pages will you print in each paper sheet just by choosing it in the Number of pages per sheet. If you choose 1, you will have a classical printing. If you choose 2, you will get two pages printed in each paper sheet.

The separate odd and even pages allows you to choose if you want to print in single-side or double-side mode. If it's not selected, all the pages will be sent to the printer (in reverse order if print pages in reverse order was checked in the configuration window). If it's selected, the odd pages will be sent to the printer (in reverse order if print odd pages in reverse order was checked in the configuration window), and then the program will show a dialog, waiting for you to press OK when the printer has ended and you had put again the paper sheets in the paper tray. Then, the even pages will be sent to the printer (in reverse order if print even pages in reverse order was checked in the configuration window).

If you check the Print as book button, automatically will be checked the Group 2 pages per physical page and separate odd and even pages. GtkPSproc will reorder the pages too, so after printing them, you will have a booklet.

Finally, you can tell the number of copies you want. It's better to choose here the number of copies to print, because you can have troubles if you print more than one copy and want to print in double-side, or grouping two or more pages into one sheet...

In the bottom line you can change the print command. This command will be stored in your configuration, so you can change it and forget to do it again.

Configuring your programs to use GtkPSproc

Another way to use GtkPSproc is from each program. You can do this just changing the print command. I will put here three examples, in order to help you to catch the idea.

Galeon and other Gnome related programs

Just choose Print in the upper menu. You will see this window:

As you can see in the red zone, you only have to choose PostScript/default and change the original LPR command with the new gtkpsproc command, and Galeon (and other Gnome related programs) will call GtkPSproc before sending all to the printer. Of course, you will need to configure each program in this way, but each program will remember the change, so you will need to do this once.

AbiWord

To print to GtkPSproc from AbiWord, just choose print in the upper menu. You will see this window:

As you can see, you have to choose first the Generic PostScript option, wich lets you choose the location. You only have to change this to gtkpsproc, and it's done. Of course, AbiWord will remember the change, so you will need to do this once.

OpenOffice.org

You have to run the program spadmin, that you can find in your OpenOffice.org folder:

There, you can add a new printer or edit the properties of the Generic Printer. If you choose this last option, you will see this dialog:

Just change the original LPR command with the new gtkpsproc command in the red zone, and that's all. Remember that OpenOffice.org needs a lot of time to send all the work to the printer, so there can pass one minute or two between you click Print in OpenOffice.org and GtkPSproc shows its main window. Don't be impatient.

How to contact with the author

Sergio Costas Rodriguez

Raster Software Vigo

Web: www.rastersoft.com

Mail: raster@rastersoft.com