Printer configurator plug-in information
_________________________________________________________________


ABOUT

a2print pipes a2ps formatted files (or normal postscript files) to
ghostscript. Ghostscript formats it for a specific non-postscript printer
and pipes it to 'lpr'. Ghostscrip "knows" how to format output for
many non-postscript printers. You have to study the documentation of
ghostscript and read file "devices.txt" in ghostscript package to be able
to use this feature on your specific printer.
And that is what I tried to simplify! Using a2print printer plug-ins, you
don't have to know all these ghostscript options. You simply install
the plug-in and click printer options like "quality", "resolution",
"color"...

Since you usually need only one or two printers, a2print uses printer
plug-ins. One plug-in configures ghostscript for one printer (or several
printers that are alike). You simply find apropriate plug-in and copy it
to a2print installation directory. Then, all you have to do is start
a2print and "click away" :)

Another reason for printer plug-ins is that ghostscript knows MANY
printers and I can not make interfaces for them all! This way anybody can
make a plug-in and a2print will work with it!

So, I'm counting on YOUR help! You can write a2print printer configurator
plug-ins by fallowing these rules:


HOW TO MAKE A PLUG-IN

1. plugin has to be written in Tcl

2. Name of printer plugin has to be:
	<name>.printer
where <name> is something that asociates to printer model it is for or to
ghostscript printer driver name (cdeskjet, cdj550, epson...)

3. You have to include file named:
	<name>.printer.info
and write in it a VERY SHORT info about your plugin. What printers is it
for, what ghostscript printer name it uses, author, version, address...
Text from this file will apear in a2print after pressing "info" button in
"ghostscript" tab.

4. It must have configuration file named:
	<name>.printerc

- that file must not be needed to start a printer plug-in. Plug-in must
have default values included in the code. This config file must be created
after first execution of the plug-in.

5. Configuration file must be saved in ~/.a2print directory together with
a2print config file "a2printrc"

6. First line of the plug-in config file must include ALL ghostscript
options configured in the plug-in just as they are typed on the command
line.
Example of the first line:
-sDEVICE=cdj550 -dBitsPerPixel=3 -dShingling=2 -dDepletion=1 -r600x300

standard ghostscript options like -dNOPAUSE,-dSAFER, -dNOPLATFONTS... must
not be included. a2print takes care of that. Plug-in takes care only of
printer options!

7. plug-in must have buttons OK and CANCEL

8. OK button saves config file and exits

9. CANCEL button exits without saving

10. Every time the plug-in is started it must load the options from the
config file.
This basicaly means that it remembers the last "position" of options.

11. all plug-in files must be installed in a2print installation directory.
However, you can use a subdirectory for some additional files that a2print
doesn't need.

Other stuff:

1. When a2print starts the plug-in it passes only one parameter. It is the
installation directory of a2print. Why this can be useful?...
- you can use a2print text viewer from that directory to view some text
files (like help)
- you can use it if you have any additional files needed by your plug-in,
like gif images, help files...

2. You can make a plug-in that is used for several similar printers. If
you do so, it is wise to use several config files too. One config file for
each printer. But you still have to respect rule number 4! So you have to
use config file <name>.printerc.
There are two ways to solve this.
- Save configs of all printers to this one file (respecting rule number 6)
- Use several config files but also use config file: <name>.printerc
First line of that config file has to be as explained in rule number 6.

So please, join the project and HELP. Make your own plug-in!
Let me know if you have any questions, problems, comments...
Let me know when you are done with the plug-in. I will put a link to your
plug-in homepage or include it in a2print home page!

____________________________________________________________________
All comments and suggestions are VERY WELCOMMED!

Mirko Vukusic   (mirko@efst.hr)
Doverska 33
21000 Split
Croatia

http://www.efst.hr/~mirko/a2print
