
XPP - The X Printing Panel
==========================

http://cups.sourceforge.net/xpp/

Copyright 2001 by Till Kamppeter


This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307  USA

CUPS and the CUPS logo are the trademark property of Easy Software products.
All other trademarks are the property of their respective owners.


Bugs, fixes, suggestions, and improvements please send to

   till.kamppeter@gmx.net

NOTE: This software is still under development and so it can contain
many bugs!



Requirements:
-------------

   CUPS 1.1.1 or newer

      The beta versions of 1.1 and 1.1 itself work, too, but in the
      beta versions the "Image pos" button ("Options"/"Advanced") does not 
      work and in 1.1 final the printer-specific options are not displayed.
      So an update to 1.1.1 is highly recommended.

      Download from: www.cups.org

   FLTK 1.0.7 or newer

      Download from: www.fltk.org



Installation of XPP
-------------------

Install CUPS 1.1.1 or newer (from the source code or binaries) and
FLTK 1.0.7 or newer (from the source code) as described in the
documentation of the respective packages.

This works under SuSE 6.1, 6.2, Mandrake 7.x, and Compaq/Digital
Tru64 Unix 4.0f without any problems or special adjustments (always
gcc and gmake were used).

If under SGI IRIX 6.5.5 the compilation of FLTK with gcc does not work, use
SGI's proprietary compiler entering

   setenv CC cc
   setenv CXX CC
   ./configure
   setenv SGI_ABI -n32
   gmake
   gmake install (as root)

Now XPP itself can be compiled:

Because XPP overloads a function of the CUPS library it must be linked
against the dynamic CUPS library. Therefore create a link:

   ln -s /usr/local/lib/libcups.so.2 /usr/local/lib/libcups.so

or

   ln -s /usr/lib/libcups.so.2 /usr/lib/libcups.so

and remove the static CUPS library with

   mv /usr/lib/libcups.a /usr/lib/libcups.a.orig

or

   mv /usr/local/lib/libcups.a /usr/local/lib/libcups.a.orig

Under Linux enter

   ldconfig

afterwards.

If you have Mandrake 7.1 or newer enter

   export CXXFLAGS=-fno-rtti

Now compile the program with

   ./configure
   make

If you are on a proprietary Unix and 'make' gives a syntax error or similar,
try GNU make (gmake, http://www.gnu.org/software/make/make.html) instead.

If the compilation quits with a syntax error in the file "http.h" there
is a file missing in the installation of CUPS. The error appeared for me
on a Linux machine where I have compiled CUPS 1.1b3 from the source code.

Install the file manually with the command

   cp <CUPS source dir>/cups/md5.h /usr/include/cups

and try the comilation of XPP again.

To install XPP, type

   make install

logged in as 'root'. This copies the executable 'xpp' into the
/usr/local/bin directory and removes its debug information to make it
as small as possible.

IMPORTANT HINT FOR USERS OF CUPS 1.1:

The CUPS library has a bug, the support for short printer names
(without @<server>) was not done completely. So it is now problem to
print using the short name, but the printer-specific options cannot be
requested with the short name. So XPP assumes that the printer is a
class and does not show the printer's options.

Please update to CUPS 1.1.1 or newer to solve this problem. There are other
bugs fixed, too.

If you cannot update for some reason, turn off the short name support
with

   BrowseShortNames No

in the /etc/cups/cupsd.conf file. Do not forget to remove the '#' in
the beginning of the line and to restart the CUPS daemon by one of the
following commands, depending on the operating system you are using
(logged in as 'root'):

   /etc/rc.d/init.d/cups restart
   /sbin/init.d/cups restart
   /etc/init.d/cups restart
   killall -HUP cupsd

Start xpp again and you will have all options now. And having short
printer names is not so important when one chooses the printers by a
mouse click.


Usage tips
----------

To call the program, simply type

   xpp <file name>

or only

   xpp

at the command prompt or put 'xpp' into the printing command fields of
your applications (Netscape, gv ...). Netscape remembers your print
command automatically, in 'gv' click on 'State' at the top of the
window and choose 'Setup Options' in the upcoming menu. In the dialog
appearing then adjust the 'Print command' (at the bottom of the
window) to 'xpp'.  Then turn off the button 'Confirm Printing' (on the
left hand side of the dialog) by clicking on it. Now click the buttons
'Apply', 'Save', and 'Dismiss' one after the other. Now the poor
printing dialog of 'gv' is replaced by a better one.

After giving the command shown above or when printing out of an
application, you will get a dialog window where you can choose the
printer on which you want to print and the number of copies you want
to print from your file. All printers in your network made available
for your machine via CUPS will appear in the list. For printing there
are a lot of options available, click the 'Options' button and adjust
the behaviour of the printer as you want. You can save these settings
for every individual printer with the 'Save Settings' button and you
can make you preferred printer pre-selected by a click on the 'This
printer as default' button.

One can also choose printer-specific options by clicking on the tabs
in the option window. If you change any options and some options
appear in red (the appropriate tabs appear in red, too, so that on can
easily find red options) there are conflicts between options. In this
case both conflicting (red) options cannot be used at the same time
(as for example double-sided printing on transparencies or envelope
feeder as paper input when there is no envelope feeder
installed). Saving such settings or printing with them is not
possible. You will get an error message.

Note that not all options apply to every printer and that the
definitions of the paper sources differ from printer to printer,
too. So do some tests to check out which options work in what way on
your printer.

To store more than one set of options for a printer click on the
'Instances' button and copy the default instance of the desired
printer. Select it in the list, choose 'Copy' and enter a name. Click
on 'Apply'. After closing the dialog, you can print via the original
list entry for your printer or by the new one (the new
'instance'). You can independently modify and save the options for
these entries with the 'Options' button. The 'Instances' dialog allows
also to copy more instances, to rename, or to delete them.

You can even use all command line options of the lpr command of CUPS
('man lpr' or http://localhost:631/sum.html) when you give the 'xpp'
command. So your pre-selected printer (or options) can be different
depending on whether you print out of Netscape or out of gv. Example:
In Netscapes printing dialog you use 'xpp -o number-up=2 -o
sides=two-sided-short-edge' as printing command and your web page and
E-Mail printouts are printed in a paper-saving two-pages-on-one-sheet
mode and in gv you use simply 'xpp' as print command to print
documents in the normal way. Options changed by using command line
options can nevertheless be changed back in the Options dialog of
CUPS.

Have a lot more fun with printing now ...
