390 lines
9.2 KiB
HTML
390 lines
9.2 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Ghostscript.</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
HREF="t1.htm"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Vendor Solutions"
|
|
HREF="x1597.htm"><LINK
|
|
REL="NEXT"
|
|
TITLE="Networks"
|
|
HREF="x1751.htm"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x1597.htm"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x1751.htm"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="ghostscript"
|
|
></A
|
|
>Ghostscript.</H1
|
|
><A
|
|
NAME="AEN1689"
|
|
></A
|
|
><A
|
|
NAME="AEN1691"
|
|
></A
|
|
><P
|
|
> <A
|
|
HREF="http://www.cs.wisc.edu/~ghost/"
|
|
TARGET="_top"
|
|
>Ghostscript</A
|
|
> is
|
|
an incredibly significant program for free software-driven
|
|
printing. Most printing software under Unix generates PostScript,
|
|
which is typically a $100 option on a printer. Ghostscript,
|
|
however, is free, and will generate the language of your printer
|
|
from PostScript.</P
|
|
><P
|
|
>Ghostscript is available in several forms. The commercial version of
|
|
Ghostscript, called Aladdin Ghostscript, may be used freely for
|
|
personal use but may not be distributed by commercial entities. It
|
|
is generally a year or so ahead of the free Ghostscript; at the
|
|
moment, for example, it supports many color inkjets that the older
|
|
Ghostscripts do not and has rather better PDF support.</P
|
|
><P
|
|
>The main free version of Ghostscript is GNU Ghostscript, and is
|
|
simply an aged version of Aladdin ghostscript. This somewhat
|
|
awkward arrangement has allowed Aladdin to be a totally self-funded
|
|
free software project; the leading edge versions are done by L
|
|
Peter and a few employees, and are licensed to hardware and
|
|
software vendors for use in commercial products. Unfortunately,
|
|
while this scheme has provided for L Peter's continued work on
|
|
Ghostscript for years, it has also inhibited the participation of
|
|
the wider free software community. Driver authors, in particular,
|
|
find the arrangement poor. L Peter's retirement plans mandate a
|
|
larger community involvement in the project, so he is considering
|
|
license changes, and has established a SourceForge project.</P
|
|
><P
|
|
>The third version of Ghostscript is ESP Ghostscript, maintained by
|
|
Easy Software Products (authors of CUPS) under contract from Epson.
|
|
ESP Ghostscript is a combination of the gimp-print driver project's
|
|
drivers and GNU Ghostscript, plus assorted usability patches. This
|
|
version is not yet in full swing, but it will be available soon,
|
|
and will hopefully simplify life for owners of Gimp-print-driven
|
|
printers.</P
|
|
><P
|
|
>Whatever you do with <B
|
|
CLASS="command"
|
|
><A
|
|
HREF="http://www.linuxprinting.org/man/gs.1.html"
|
|
TARGET="_top"
|
|
>gs</A
|
|
></B
|
|
>, be very sure to run it with the option for disabling
|
|
file access (<TT
|
|
CLASS="option"
|
|
>-dSAFER</TT
|
|
>). PostScript is a fully
|
|
functional language, and a bad PostScript program could give you
|
|
quite a headache.</P
|
|
><P
|
|
>Speaking of PDF, Adobe's Portable Document Format (at least through
|
|
1.3) is actually little more than organized PostScript in a
|
|
compressed file. Ghostscript can handle PDF input just as it does
|
|
PostScript. So you can be the first on your block with a
|
|
PDF-capable printer.</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="invoking-gs"
|
|
></A
|
|
>Invoking Ghostscript</H2
|
|
><P
|
|
>Typically, Ghostscript will be run by whatever filter you settle
|
|
upon (I recommend Foomatic if your vendor didn't supply anything
|
|
that suits you), but for debugging purposes it is often handy to
|
|
run it directly.</P
|
|
><P
|
|
> <B
|
|
CLASS="command"
|
|
>gs -help</B
|
|
>will give a brief listing of options
|
|
and available drivers (note that this list is the list of drivers
|
|
compiled in, not the master list of all available drivers).</P
|
|
><P
|
|
>You might run gs for testing purposes like: `<B
|
|
CLASS="command"
|
|
>gs
|
|
<options> -q -dSAFER -sOutputFile=/dev/lp1
|
|
test.ps</B
|
|
>'.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="gs-tuning-stuff"
|
|
></A
|
|
>Ghostscript output tuning</H2
|
|
><A
|
|
NAME="AEN1713"
|
|
></A
|
|
><P
|
|
>There are a number of things one can do if Ghostscript's output is
|
|
not satisfactory (actually, you can do anything you darn well
|
|
please, since you have the source).</P
|
|
><P
|
|
>Some of these options, and others are described in the Ghostscript
|
|
User Guide (the file <TT
|
|
CLASS="filename"
|
|
><TT
|
|
CLASS="replaceable"
|
|
><I
|
|
><A
|
|
HREF="http://www.cs.wisc.edu/~ghost/aladdin/doc/Use.htm"
|
|
TARGET="_top"
|
|
>Use.htm</A
|
|
></I
|
|
></TT
|
|
></TT
|
|
> in the Ghostscript distribution;
|
|
possibly installed under <TT
|
|
CLASS="filename"
|
|
>/usr/doc</TT
|
|
> or<TT
|
|
CLASS="filename"
|
|
>/usr/share/doc</TT
|
|
> on your system) are all
|
|
excellent candidates for driver options in your filter system.</P
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gs-output-loc-size"
|
|
></A
|
|
>Output location and size</H3
|
|
><P
|
|
>The location, size, and aspect ratio of the image on a page is
|
|
controlled by the printer-specific driver in ghostscript. If you
|
|
find that your pages are coming out scrunched too short, or too
|
|
long, or too big by a factor of two, you might want to look in
|
|
your driver's source module and adjust whatever parameters jump
|
|
out at you. Unfortunately, each driver is different, so I can't
|
|
really tell you what to adjust, but most of them are reasonably
|
|
well commented.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gsgamma"
|
|
></A
|
|
>Gamma, dotsizes, etc.</H3
|
|
><A
|
|
NAME="AEN1728"
|
|
></A
|
|
><P
|
|
>Most non-laser printers suffer from the fact that their dots are
|
|
rather large. This results in pictures coming out too dark. If
|
|
you experience this problem with an otherwise untunable driver,
|
|
you could use your own transfer function. Simply create the
|
|
following file in the ghostscript lib-dir and add its name to the
|
|
gs call just before the actual file. You may need to tweak the
|
|
actual values to fit your printer. Lower values result in a
|
|
brighter print. Especially if your driver uses a Floyd-Steinberg
|
|
algorithm to rasterize colors, lower values ( 0.2 - 0.15 ) are
|
|
probably a good choice.</P
|
|
><P
|
|
> <PRE
|
|
CLASS="programlisting"
|
|
> %!
|
|
%transfer functions for cyan magenta yellow black
|
|
{0.3 exp} {0.3 exp} {0.3 exp} {0.3 exp} setcolortransfer
|
|
|
|
|
|
</PRE
|
|
>
|
|
</P
|
|
><P
|
|
>It is also possible to mend printers that have some kind of
|
|
color fault by tweaking these values. If you do that kind of
|
|
thing, I recommend using the file<TT
|
|
CLASS="filename"
|
|
>colorcir.ps</TT
|
|
>, that comes with ghostscript (in
|
|
the <TT
|
|
CLASS="filename"
|
|
>examples/</TT
|
|
> subdirectory), as a test page.</P
|
|
><P
|
|
>For many of the newer color inkjet drivers, there are
|
|
command-line options, or different upp driver files, which
|
|
implement gamma and other changes to adapt the printer to
|
|
different paper types. You should look into this before playing
|
|
with Postscript to fix things.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="gscolor"
|
|
></A
|
|
>Color Printing in Ghostscript</H3
|
|
><A
|
|
NAME="AEN1740"
|
|
></A
|
|
><P
|
|
>Ghostscript's default color dithering is optimized for
|
|
low-resolution devices. It will dither rather coarsely in an
|
|
attempt to produce 60ppi output (not dpi, ppi - the "apparent"
|
|
color pixels per inch you get after dithering). This produces
|
|
rather poor output on modern color printers; inkjets with photo
|
|
paper, in particular, are capable of much finer ppi settings.</P
|
|
><P
|
|
>To adjust this, use the Ghostscript option<TT
|
|
CLASS="option"
|
|
>-dDITHERPPI=x</TT
|
|
>, where <TT
|
|
CLASS="option"
|
|
>x</TT
|
|
> is the
|
|
value to use. This may or may not have an effect with all
|
|
drivers; many newer drivers (the Epson Stylus<B
|
|
CLASS="command"
|
|
>stp</B
|
|
> driver, for example) implement their own
|
|
dithering and pay no attention to this setting. Some drivers can
|
|
use either the regular Ghostscript or driver-specific dithering
|
|
(the Canon Bubblejet <B
|
|
CLASS="command"
|
|
>bjc600</B
|
|
> driver, for
|
|
example).</P
|
|
><P
|
|
>Ghostscript's dithering is in fact rather rudimentary. Many
|
|
things needed for good output on modern printers are simply not
|
|
available in the Ghostscript core. Various projects to fix this
|
|
situation—and the free software world does have the
|
|
software to do so ready and waiting—are hampered by
|
|
Ghostscript's licensing situation and the resulting "cathedral"
|
|
development style. Beginning at the <A
|
|
HREF="http://www.linuxprinting.org/summit.html"
|
|
TARGET="_top"
|
|
>Open Source
|
|
Printing Summit 2000</A
|
|
>, however, all the necessary people are
|
|
talking, so you can expect this situation to improve shortly.</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x1597.htm"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="t1.htm"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x1751.htm"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Vendor Solutions</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Networks</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |