Disclaimer: I have created the contents of this page strictly on my own. You use any of this without any official support and at your own risk.
GhostScript is a PostScripttm interpreter available under the GNU Public License free of charge. It can be used to provide a PostScripttm RIP for a wide variety of non-PostScripttm dot matix, thermal, inkjet, and laser printers. It also can be used to preview PostScripttm documents on a number of platforms and the Aladdin version can convert PDF documents to PostScripttm
GhostScript is distributed in source from a number of FTP servers on the internet. Below is a list of only some of the many site from which you can download a copy:
If you have downloaded a Solaristm Package containing binaries for you system, you will simply need to add the package to your system, write and interface script (or filter definition) to plug it into LP, and configure it under LP. If you have downloaded the source, you will need to configure the source base to build under Solaristm, Build the Software and install it.
% /bin/su # pkgadd -d (solaris package location) all
% cp unix.mk Makefile % edit Makefile make the modifications that follow: * installation location The installation location is controlled by setting the "prefix" variable in the Makefile to the location you wish to install in. I would recommend using a location like /opt/GhostScript or /usr/local. * supported devices The devices you wish to support is controked by the "DEVICE_DEVXX" variables. A number of devices are supported by default. You will want to look and see that that all of the devices you are interested in are configured in these variables. The default behaviour is not to build support for SPARCPrinters on a Sparc system. It you would like to support a SPARCPrinter from a Sparc system, you will have to add "sparc.dev" to one of the DEVICE_DEVXX variables and make sure you "lpvio.h" header file is somewhere in the include path for the build. % make all % make install
note: Because LP runs the interface script as lp or the submitting user, and the fact that GhostScript must open the lpvi or spd device when driving a SPARCprinter, the lpvi device must be set to mode 0666 or GhostScript must be SGID to a group that has privilege to to read/write the device. Failure to do this will result in no output and the following message from GhostScript:
Error: /invalidfileaccess in --.outputpage--
% /bin/su # lpadmin -p printer -v /dev/null -I postscript -T ps \ -i /opt/PRINTtoys/lib/interfaces/SPARCprinter # cd /etc/lp/fd ; for filter in *.fd ; do > name=`basename $filter .fd` > lpfilter -f $name -F $filter > done # accept printer # enable printerIf your printer is not a SPARCprinter, You can configure LP in one of two manners. The first method is just like configuring a SPARCprinter as is done above, but instead of using "/dev/null" as the device, you would use the actual device that the printer is connected to.
% /bin/su # lpadmin -p printer -v /dev/bpp0 -I postscript -T ps \ -i /opt/PRINTtoys/lib/interfaces/GSinterface # cd /etc/lp/fd ; for filter in *.fd ; do > name=`basename $filter .fd` > lpfilter -f $name -F $filter > done # accept printer # enable printerThe alternative method of configuring LP to use GhostScript is to configure GhostScript as a a slow filter that converts from PostScripttm to an input type accepted by the printer. One of the advantages of this method is that communication with the printer uses one of the standard interface script, so there is generally slightly better status reporting, and network attached printers can be included using either the vendor supplied support, or the Solaristm support in 2.6
% /bin/su # lpadmin -p printer -v /dev/bpp0 -I simple,hpgl -T hplaser \ -i /usr/lib/lp/model/standard # cd /etc/lp/fd ; for filter in *.fd ; do > name=`basename $filter .fd` > lpfilter -f $name -F $filter > done # lpfilter -f GhostScript -F /opt/PRINTtoys/lib/GS_HPGL.fd # accept printer # enable printer
% /bin/su # pkgadd -d SUNWlpvi.pkg SUNWlpvinote: this package is unofficial and unsupported, as such, it will not be patched or updated. For an official lpvi driver you must use the NeWSprint Distribution media.