Daniele Berti's Ghostscript with STP driver support
Latest update: October 15 2001
README
Credits
Caveats
Precompiled RPMs
Source RPMs
Installing and setting up
Help
CREDITS
Many thanks to the teams of GIMP-PRINT
project and of LINUXPRINTING
from which I took documentation and sources that made it possible to me to realize this really small
contribute to Linux community.
Last but not least, I would like to thank all people at GNU
GHOSTSCRIPT project.
CAVEATS
BEFORE downloading be aware that some skill is necessary to know what you're
doing over your Linux box with the below mentioned RPMs packages.
THEN: this packages are meant to be used with RedHat
distribution.
I've been reported a successful compile under LinuxPPC 2000 (starting of
course from sources), yet this distribution is RH
based ;-)
Particularly, knowing printing mechanism under Linux is mandatory: so read your PRINTING howto first.
For USB printers you may want
to check this
site.
IMHO USB support under Linux is not yet stable anyway...... ;-)
ALSO some of your printer's capabilities may not (yet) be supported by STP driver: you are encouraged to check it yourself here before proceding.
I'd like to point your attention to the fact that actual "conflicts" with RH6.2-7.x <ghostscript> package will arise (if the RH flavoured package is installed).This is because -of course- "my" gs executable is different with the one installed by the original RPM.
In addition to this, RH6.2-7.x <ghostscript-fonts> is something different from the here provided package: even if they've same package (not file) name, the contents and the path are respectively complementary and different.So I was pushed to add </usr/share/fonts/default/ghostscript> PATH support into GS executable so that both fonts packages contents are used.
Be sure that you're using the latest packages (except ghostscript and ghostscript-fonts) for your RH version: i.e. pick up the updates from one of these mirrors.
If you don't find any update for
these packages, it means that the latest are still the ones shipped with your RH
CD(s).
PRECOMPILED
RPMs
ghostscript-5.50-23.4.05.i386.rpm
(1813Kb, 28.05.2001, gnu-gs 5.50a, Gimp-Print 4.04, glibc 2.1.3-22, rpm 4.02)
ghostscript-fonts-5.50-23.4.05.noarch.rpm (1873Kb, 28.05.2001, gnu-gs 5.50a, Gimp-Print 4.04, glibc 2.1.3-22, rpm 4.02)
SOURCE
RPMs
If you like to compile the packages yourself, here are the SOURCE RPMs.
You are likely to need at a bare minimum the following packages to do a
successful compile:
rpm
rpm-devel
rpm-build
sharutils
zlib-devel
svgalib
svgalib-devel
libpng
libpng-devel
glibc
glibc-devel
XFree86-devel
Be sure that you're using the latest packages (except ghostscript and ghostscript-fonts) for your RH version: i.e. pick up the updates from one of these mirrors.
If you don't find any update for these packages, it means that the latest are still the ones shipped with your RH CD(s).
NOTE for RH 7.x users: you are strongly encouraged to make your own RPMs starting from these sources, to bypass eventual libs (and any other possible source of) backwards incompability !!
ghostscript-5.50-23.4.05.src.rpm (4234Kb, 28.05.2001, gnu-gs 5.50a, Gimp-Print 4.05, rpm 4.02)
ghostscript-fonts-5.50-23.4.05.src.rpm (1836Kb, 28.05.2001, gnu-gs 5.50a, Gimp-Print 4.05, rpm 4.02)
INSTALLING
AND SETTING UP
Installing compiled RPM packages:
rpm -Uvh --force ghostscript-5.50-23.4.05.i386.rpm
rpm -Uvh --force ghostscript-fonts-5.50-23.4.05.noarch.rpm
Installing source RPM packages:
rpm -Uvh --force ghostscript-5.50-23.4.05.src.rpm
rpm -Uvh --force ghostscript-fonts-5.50-23.4.05.src.rpm
To rebuild RPM packages from installed SRC packages cd to </usr/src/redhat/SPECS>
and do <rpm -ba specfilename> for each spec file. Tipically you'll find
compiled RPM packages into /usr/src/redhat/RPMS/.... path.
Important!!: in some cases en
error will occur which leads to failure
in compiling ghostscript with a message like..."/usr/bin/ld didn't
find -lXt".
This is due to the fact that default makefile <unic-gcc.mak>
as provided with ghostscript source rpm, looks for X libraries into </usr/X11/lib>
path.
In a PC of a customer of mine the path was </usr/X11R6/lib>....and I kept
on having error messages.
Solution: copy and decompress
<tar -xzvf gnu-gs-5.50.tar.gz> file (</usr/src/redhat/SOURCES/gnu-gs-5.50.tar.gz>)
into a brand new dir, lets say </tmp/1> then remove the tar.gz file itself.Open
for editing unix-gcc file into gs5.50 dir and look for XLIBDIRS=-L/usr/X11/lib .Change
the path accordingly to your system. Then <cd ..>.Recompress all the stuff
<tar -zcvf gnu-gs-5.50.tar.gz *>.Copy the tarball file to </usr/src/redhat/SOURCES/gnu-gs-5.50.tar.gz>
thus overwriting original file with same name. Compile as above said. For "lazy"
guys out there and only for </usr/X11R6/lib>
path flavour, <ln -s /usr/X11R6 /usr/X11> (Thanks to Thomas
Orlowsky ).
How to check that ghostscript has stp support?
gs -h | grep stp
If the output contains stp it's all ok.
After having installed the packages and checked as above, you've to add following lines to your <printerdb> file (as provided by package <rhs-printfilters>) in order to make <printtool> know that you've got STP driver support :
StartEntry: STP driver
GSDriver: stp
Description: {STP driver}
About: { \
STP driver.\
}
Resolution: {360} {360} {}
EndEntry
Fire up X then printtool and add a new printer, pointing to the STP driver entry, give it the desidered name of your printer (in my case 700stp, for my Epson Photo 700).Note that this is only a reference name.
Into the EXTRA GS options field you've to type the options from what follows here at the voice "OPTIONS:".
Finally, it's a good idea to add PRINTER environment variable (in my case, matching the above mentioned reference name, PRINTER="700stp"), otherwise in some cases you'll have to add into the print command the -P printername switch to see things work .Of course the line containing export..... must contain also PRINTER .Due to the overhelming number of people that are E-Mailing me asking HOW to do this, I'll tell you that you must check/insert these clauses -either PRINTER="700stp" variable definition or PRINTER statement (the later to the line beginning with export word )- into each file named <.bash_profile> .Where is such a file?Into every user's home dir.
Once added the printer to your environment, re-login and check the work done.
How to check if the printer has been actually added to
environment?
export | grep PRINTER
If the output contains your printer's name (ie. 700stp), printer has been
added to environment.
Start X if not already running, start printtool, select your printer, print tests...you should be done :-)
HELP
Feel free to contact me here providing
any helpy info (i.e.: tell me first what checks have been done and their results,
attach <printerdb> file along with ALL of the files located into your
spooling dir).
Many people asked me to provide help about supported page sizes: just hit
man gs
Of course the -sPAPERSIZE=a_known_paper_size switch must be added to EXTRA GS options ;-)
----------------
Cheers from Italy
Daniele Berti