GTKPSPROC, a GTK2-frontend for PSUTILS


GtkPSproc is a GPL front-end for the PSUTILS. PSUTILS are a set of little programs that allows to manage in a lot of ways your PostScript files (the data you send to your printer).

Click here to read the GPLv3 license.

GtpPSproc is designed to work from all programs that uses the CUPS printing system, which means nearly the 100% of the current GNU/Linux programs. It can works as a LPR replacement too.

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 when your printer doesn't support it.

Maybe you can ask why use GtkPSproc instead of GtkPrint interface, having in mind that the later has nearly the same capacities than the former. The answers are:

Using GtkPrint in GtkPSproc allows to adjust the printer parameters like print quality, paper feeder...

Installing GtkPSproc

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

     make install-printer

from the command line. But if you preffer to recompile it from source code, just type:

     make clean
     make
     make install-printer

The 'install-printer' option of make will install GtkPSproc AND will create a new virtual printer in your system (called gtkpsproc). If the virtual printer is already created and only want to re-install the program files, you can just use 'make install'.

Using GtkPSproc

GtkPSproc can be used in two ways: from command line or as a CUPS front-end.

Using GtkPSproc from command line

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.

Using GtkPSproc as a CUPS front-end

Starting from version 3.0 is possible to use GtkPSproc directly from CUPS. This mean that you don't need to configure each program to send it's output to GtkPSproc, but just choose the new virtual printer and click the Print button. Unfortunately, in order to make this method to work you must have a little daemon running in your X-windows session. This is a must because the CUPS daemon doesn't have access to the window system. There are two ways of launching the daemon: under GNOME, or under other desktop manager.

Under GNOME desktops

If you use a GNOME desktop, you only need to add a little applet. Choose "Add to the panel" in your menu bar and install the GtkPSproc applet (the applet was installed in your system when you performed the make install-printer command).

After installing the applet, it will be always available in your menu bar, as you can see in the next capture, so you can just install it and forget it.

Since the applet is done with Python, you will need the interpreter and the following modules:

If you try to launch the applet without theses modules, you will receive an error message telling you what modules are missed.

Under non-GNOME desktops

You must launch the daemon with the command:

    /usr/bin/psproc-applet standalone

The standalone option is a must when using it as a standalone application instead of launching it as a GNOME applet.

You will have to find how to make your desktop to automatically launch de daemon at startup and keep it running.

Working with GtkPSproc

After launching the daemon you will be able to work with GtkPSproc just like with another printer. You can even set it as your default printer. When you choose to print from a program, you just will see from the printing dialog a printer called gtkpsproc, like in this printing window from AbiWord:

Just printing to that printer will send your job to the right GtkPSproc daemon (you can have multiple users, each one with its own X session and its own daemon, and each one will receive only its own jobs). The daemon will launch GtkPSproc with that job, showing you the main window.

The first time you send a job to GtkPSproc, you will see that all your printers have a tail saying that they aren't configured yet. To configure them, just click the Preferences button. There you will see this window:

There you will be able to set the printer type for each one of your printers (you can have more than one physical printer, and each one with its own configuration).

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 the printer 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 the printer to work with HP inkjet printers and others that uses the same paper feeder.

Laser style: this icon configures the printer to work mainly with single-side 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 (example: you have a double-side capable laser 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 emulated double-side mode (this is, when you check the Separate even and odd pages). This configuration is made to be sure that the papers with the odd pages printed can be put again in the tray without the need of reordening before.

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).

Of course, if your printer is double-side capable, you can forget the emulated double-side options.

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.

Finally, the option Preview program allows to choose the PS file viewer to use when you want to preview the document. The default option is Evince, but you can change it to GGV, GV or another one. If the program can't find it in the system, it will return an error and disable preview until you install the viewer or choose another one.

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

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

At the top you will see the tittle of the job.

Inmediately under it you can choose how many pages will you print in each paper sheet just by choosing it in the Number of pages per sheet selector. If you choose 1, you will have a classical printing. If you choose 2, you will get two pages printed in each paper sheet. When you print 2 or 8 pages per sheet, the even pages will be rotated 180 degrees to put all them in the same position that the odd pages, so you will be able to use GtkPSproc from double-side capable printers (this is a new feature added in version 3.0).

The separate odd and even pages allows you to choose if you want to print in single-side or emulated 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). Of course, if your printer is double-side capable, you must leave it unchecked.

If you check the Print as book button, automatically will be checked the Group 2 pages per physical page. GtkPSproc will reorder the pages too, so after printing them, you will have a book. If your printer is non double-side capable, you will need to check the separate odd and even pages button too.

Then, 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...

Below it you can find one or two preview buttons, which allows to preview the odd and even pages of the document before sending it to the printer, to check that all is fine.

Finally you have the Print button, which shows the classic GtkPrint dialog where you can choose the printer to use and the options for it, like paper feeder, print quality...

Recompiling GtkPSproc

To recompile GtkPSproc you will need the following developmen libraries:

Known bugs

Version history

Special thanks to Juan José Rodríguez Molina, for his work as betatester.

How to contact with the author

Sergio Costas Rodriguez

Raster Software Vigo

Web: www.rastersoft.com

Mail: raster@rastersoft.com