Bug 688654 - Emacs ps-print files no longer work in gs
Summary: Emacs ps-print files no longer work in gs
Status: NOTIFIED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.15
Hardware: PC Linux
: P4 normal
Assignee: Stefan Kemper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-16 10:58 UTC by Martin Donald
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
the postscript file, as an attachment (32.03 KB, application/postscript)
2006-04-16 12:21 UTC, Hin-Tak Leung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Donald 2006-04-16 10:58:16 UTC
Ghostscript problem report form

Before using this form, please read the instructions for reporting problems. If
you are running a developer or beta version of Ghostscript, and you are an
experienced tester (for example, if you have been testing Ghostscript for more
than a year, or you have already submitted at least two problem reports that we
accepted for investigation), you can send an informal report to the place
indicated below. Otherwise, please fill out this form completely. Fill out all
applicable items in this form.

Most importantly, you must include all data (PostScript files, PDF files,
batch/script files, and/or fonts) required to reproduce the problem, either by
giving a URL from which we can download the data, or by including the data with
the report itself. If you don't include this information, we can't investigate
the problem. Please note that the bug reports are publicly archived, so the
information you provide will be generally available. If the test data absolutely
must remain confidential, please so indicate on the form below and provide an
address we may contact privately for the file.

Once you have prepared the report, go to http://bugs.ghostscript.com. and follow
the instructions there. Data files can be attached to the bug report after the
bug is submitted. Use the completed problem reporting form as the body of the
Bugzilla submission. If by some reason the Bugzilla doesn't work for you, bugs
can be submitted as follows:

    * If you are running MS-DOS, MS Windows, or OS/2, and you are reasonably
sure that the problem is specific to your platform, mail to
bug-gswin@ghostscript.com.
    * If you are running MacOS, and you are reasonably sure that the problem is
specific to the Mac, mail to mac-gs@ghostscript.com.
    * Otherwise, mail to bug-gs@ghostscript.com. 

Fully completed problem reports help us improve Ghostscript. Thanks in advance.

------------------------------------------------------------------------
Symptoms:

Emacs has always made postscript files for me y the ps-print facility.
I use Linux and my previous distribution was Fedora Core 4, with emacs 21.4 and
ghostscript 7.07
I upgraded to Fedora Core 5 this past week and it came with emacs 21.4
(unchanged) but ghostscript was changed to 8.15.1-7.2

The files produced are no longer readable by ghostscript. I get the message:

# Error: configurationerror
# OFFENDING COMMAND: setpagedevice

# STACK:

-dictionary-

# ERRORINFO:

false
/ManualFeed

I take the same text buffer and make .ps file on my home machine (FC5) and my
work machine (RHEL3)
Both files are accepted by ghostscript at work and are rejected by my home machine.

Other people have reported the same error. See:

http://www.linuxpackages.net/forum/viewtopic.php?t=14089&highlight=&sid=fb69365fc6e3c9fc9181250a0f2ef564

http://lists.debian.org/debian-printing/2005/11/msg00046.html





------------------------------------------------------------------------
Ghostscript version (or include output from "gs -h"):

/home/mhd: gs -h
ESP Ghostscript 8.15.1 (2005-09-22)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: display
Available devices:
   alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp
   atx23 atx24 atx38 bbox bit bitcmyk bitrgb bj10e bj10v bj10vh bj200 bjc600
   bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m bmp256
   bmp32b bmpa16 bmpa16m bmpa256 bmpa32b bmpamono bmpasep1 bmpasep8 bmpgray
   bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj500 cdj550 cdj670 cdj850
   cdj880 cdj890 cdj970 cdjcolor cdjmono cfax cgm24 cgm8 cgmmono chp2200 cif
   cljet5 cljet5c cljet5pr coslw2p coslwxl cp50 cups declj250 deskjet
   devicen dfaxhigh dfaxlow display dj505j djet500 djet500c dl2100 dnj650c
   epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200
   eps9high eps9mid epson epsonc epswrite escp escpage faxg3 faxg32d faxg4
   fmlbp fmpr fs600 gdi hl1240 hl1250 hl7x0 hpdj1120c hpdj310 hpdj320
   hpdj340 hpdj400 hpdj500 hpdj500c hpdj510 hpdj520 hpdj540 hpdj550c
   hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c hpdj690c hpdj850c hpdj855c
   hpdj870c hpdj890c hpdjplus hpdjportable ibmpro ijs imagen inferno iwhi
   iwlo iwlq jetp3852 jj100 jpeg jpeggray la50 la70 la75 la75plus laserjet
   lbp310 lbp320 lbp8 lex2050 lex3200 lex5700 lex7000 lips2p lips3 lips4
   lips4v lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono ljet2p ljet3
   ljet3d ljet4 ljet4d ljet4pjl ljetplus ln03 lp1800 lp1900 lp2000 lp2200
   lp2400 lp2500 lp2563 lp3000c lp7500 lp7700 lp7900 lp8000 lp8000c lp8100
   lp8200c lp8300c lp8300f lp8400f lp8500c lp8600 lp8600f lp8700 lp8800c
   lp8900 lp9000b lp9000c lp9100 lp9200b lp9200c lp9300 lp9400 lp9500c
   lp9600 lp9600s lp9800c lq850 lx5000 lxm3200 lxm5700m m8510 mag16 mag256
   md1xMono md2k md50Eco md50Mono md5k mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8
   mgrmono miff24 mj500c mj6000c mj700v2c mj8000c ml600 necp6 npdl nullpage
   oce9050 oki182 oki4w okiibm omni oprp opvp paintjet pam pbm pbmraw pcl3
   pcx16 pcx24b pcx256 pcx2up pcxcmyk pcxgray pcxmono pdfwrite pgm pgmraw
   pgnm pgnmraw photoex picty180 pj pjetxl pjxl pjxl300 pkm pkmraw pksm
   pksmraw plan9bm png16 png16 png16m png16m png256 png256 pngalpha pngalpha
   pnggray pnggray pngmono pngmono pnm pnmraw ppm ppmraw pr1000 pr1000_4
   pr150 pr201 psdcmyk psdrgb psgray psmono psrgb pswrite pxlcolor pxlmono
   r4081 rpdl samsunggdi sgirgb sj48 spotcmyk st800 stcolor sunhmono t4693d2
   t4693d4 t4693d8 tek4696 tiff12nc tiff24nc tiffcrle tiffg3 tiffg32d tiffg4
   tifflzw tiffpack uniprint x11 x11alpha x11cmyk x11cmyk2 x11cmyk4 x11cmyk8
   x11gray2 x11gray4 x11mono xcf xes
Search path:
   . : /home/mhd/.fonts : /usr/share/ghostscript/8.15/lib :
   /usr/share/ghostscript/8.15/Resource : /usr/share/ghostscript/fonts :
   /usr/share/fonts/default/ghostscript : /usr/share/fonts/default/Type1 :
   /usr/share/fonts/default/amspsfnt/pfb :
   /usr/share/fonts/default/cmpsfont/pfb : /usr/share/fonts/japanese :
   /etc/ghostscript
For more information, see /usr/share/ghostscript/8.15/doc/Use.htm.
Report bugs to bug-gs@ghostscript.com, using the form in Bug-form.htm.


------------------------------------------------------------------------
Where you got Ghostscript:

From Fedora core 5

------------------------------------------------------------------------
Hardware system you are using (including printer model if the problem
involves printing):

PC computer


------------------------------------------------------------------------
Operating system you are using:

Linux localhost.localdomain 2.6.16-1.2080_FC5 #1 Tue Mar 28 03:38:34 EST 2006
i686 athlon i386 GNU/Linux


------------------------------------------------------------------------
If you are using X Windows, and your problem involved output to the
screen, the output from running xdpyinfo and xwininfo:

Output to screen and printer have the same error

------------------------------------------------------------------------
C compiler you are using, including its version, if you compiled
Ghostscript yourself:

------------------------------------------------------------------------
If you compiled Ghostscript yourself, changes you made to the makefiles:

------------------------------------------------------------------------
Environment variables:

GS_LIB=/home/mhd/.fonts
GS_FONTPATH=/usr/share/fonts/default/winfonts

------------------------------------------------------------------------
Command line:

------------------------------------------------------------------------
URL or FTP location of test files (include the data at the end of this
form if 500K or less):

Test file (ps) at end of this form


------------------------------------------------------------------------
Suggested fix, if any:

I am too ignorant of postscript to try to fix this

------------------------------------------------------------------------
Other comments:




Copyright © 1996, 2001 artofcode LLC. All rights reserved.

This file is part of AFPL Ghostscript. See the Aladdin Free Public License (the
"License") for full details of the terms of using, copying, modifying, and
redistributing AFPL Ghostscript.

Ghostscript version 8.15, 22 September 2004 

Here is a test file generated by the emacs command ps-spool-buffer

%!PS-Adobe-3.0
%%Title: t2.text
%%Creator: Martin Donald (using ps-print v6.5.5)
%%CreationDate: 10:07:45 Apr 16 2006
%%Orientation: Portrait
%%DocumentNeededResources: font Times-Roman Times-Italic
%%+ font Courier
%%+ font Courier-Bold
%%+ font Courier-Oblique
%%+ font Courier-BoldOblique
%%+ font Helvetica
%%+ font Helvetica-Bold
%%DocumentMedia: Letter 612 792 0 () ()
%%PageOrder: Ascend
%%Pages: (atend)
%%Requirements:
%%EndComments
%%BeginDefaults
%%PageMedia: Letter
%%EndDefaults

%%BeginProlog

/languagelevel where{pop}{/languagelevel 1 def}ifelse
/ErrorMessage  1 def

% === BEGIN ps-print prologue 0
% version: 6.0

% Copyright (C) 2000, 2001  Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
% GNU Emacs 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, or (at your option)
% any later version.
%
% GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to the
% Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.

% As a special exception, the copyright holders of this module give
% you permission to include the module in a Postscript file generated
% by Emacs or other free software together with the result of
% converting text to be printed, regardless of the license terms of
% that text, and to use under terms of your choice the page images
% resulting from formatting said combination.  If you modify this
% module, you may extend this exception to your version of the module
% but you are not obligated to do so.  If you do not wish to do so,
% delete this exception statement from your version.

%%BeginProcSet: ErrorHandler
% Downloaded Error Break-page handler
% Adapted from:
%     PostScript Language Program Design,
%     Adobe Systems Incorporated.
%     Appendix A, pages 217-219

/ps$brkpage where{pop}
{
 /ps$brkpage 64 dict def
 ps$brkpage begin
  /tx 0 def/ty 0 def/toy 0 def/tox 0 def
  /prnt{
   dup type/stringtype ne{=string cvs}if
   dup length 6 mul
   /tx exch def/ty 10 def
   currentpoint/toy exch def/tox exch def
   1 setgray newpath
   tox toy 2 sub moveto
   0 ty rlineto tx 0 rlineto
   0 ty neg rlineto
   closepath fill
   tox toy moveto 0 setgray show
  }bind def
  /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def
  /=={/cp 0 def typeprint nl}def
  /typeprint{dup type dup currentdict exch
known{exec}{unknowntype}ifelse}readonly def
  /lmargin 72 def
  /rmargin 72 def
  /tprint{
   dup length cp add rmargin gt{nl/cp 0 def}if
   dup length cp add/cp exch def
   prnt
  }readonly def
  /cvsprint{=string cvs tprint( )tprint}readonly def
  /unknowntype{exch pop cvlit(??)tprint cvsprint}readonly def
  /integertype{cvsprint}readonly def
  /realtype{cvsprint}readonly def
  /booleantype{cvsprint}readonly def
  /operatortype{(//)tprint cvsprint}readonly def
  /marktype{pop(-mark-)tprint}readonly def
  /dicttype{pop(-dictionary-)tprint}readonly def
  /nulltype{pop(-null-)tprint}readonly def
  /filetype{pop(-filestream-)tprint}readonly def
  /savetype{pop(-savelevel-)tprint}readonly def
  /fonttype{pop(-fontid-)tprint}readonly def
  /nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
  /stringtype{
   dup rcheck
   {(\()tprint tprint(\))tprint}
   {pop(-string-)tprint}ifelse}readonly def
  /arraytype{
   dup rcheck
   {dup xcheck
    {({)tprint{typeprint}forall(})tprint}
    {([)tprint{typeprint}forall(])tprint}ifelse}
   {pop(-array-)tprint}ifelse}readonly def
  /packedarraytype{
   dup rcheck
   {dup xcheck
    {({)tprint{typeprint}forall(})tprint}
    {([)tprint{typeprint}forall(])tprint}ifelse}
   {pop(-packedarray-)tprint}ifelse}readonly def
  /courier/Courier findfont 10 scalefont def
  /OLDhandleerror errordict/handleerror get def
 end %ps$brkpage

 /handleerror{
  systemdict begin $error begin ps$brkpage begin
  newerror
  {/newerror false store vmstatus pop pop 0 ne{grestoreall}if
   initgraphics
   ErrorMessage 1 and 0 ne{ % print on paper
    courier setfont lmargin 720 moveto
    (# ERROR: )prnt errorname prnt nl
    (# OFFENDING COMMAND: )prnt/command load prnt
    $error/ostack known
    {nl nl(# STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if
    $error/errorinfo known
    {nl nl(# ERRORINFO:)prnt nl nl $error/errorinfo get aload length{==}repeat}if
    systemdict/showpage get exec}if
   ErrorMessage 2 and 0 ne{ % send back to printing system
    (\%\%[ Error: )print errorname =print
    (; OffendingCommand: )print/command load =print
    $error/errorinfo known
    {(; ErrorInfo:)print $error/errorinfo get aload length{( )=print
=print}repeat}if
    ( ]\%\%)= flush
    (\%\%[ Rest of job is ignored ]\%\%)= flush}if
   /newerror true store}if
  end end end
  stop
 } % handleerror
 dup 0 systemdict put % replace name by actual dict object
 dup 4 ps$brkpage put % replace name by dict object
 bind readonly

 errordict 3 1 roll put % put proc in errordict as /handleerror
}ifelse
%%EndProcSet


% operators for language level 2 only

(<<)cvn where			% << operator
{pop/BMark(<<)cvn load def}
{/BMark{mark}bind def}ifelse
(>>)cvn where			% >> operator
{pop/EMark(>>)cvn load def}
{/EMark{counttomark 2 idiv dup dict begin{def}repeat pop currentdict end}bind
def}ifelse
/setpagedevice where		% setpagedevice
{pop}
{/setpagedevice{pop}bind def}ifelse
/packedarray where		% packedarray
{pop}
{/packedarray{array astore readonly}bind def}ifelse


% device dependent operators

/DefOp{
 dup where{pop pop pop}
 {exch dup where{pop}{pop/pop}ifelse load def}ifelse}def

/duplexmode/setduplexmode DefOp
/tumble/settumble DefOp

% === END ps-print prologue 0

%%BeginProcSet: UserDefinedPrologue


%%EndProcSet

/LandscapeMode       false def
/UpsideDown          false def
/NumberOfColumns     1 def
/LandscapePageHeight 792.0 def
/PrintPageWidth      498.6141732283465 def
/PrintWidth   498.6141732283465 def
/PrintHeight  643.7029732283465 def
/LeftMargin   56.69291338582677 def
/RightMargin  56.69291338582677 def
/InterColumn  56.69291338582677 def
/BottomMargin 42.51968503937008 def
/TopMargin    42.51968503937008 def
/HeaderOffset 28.346456692913385 def
/HeaderPad    2.4276 def
/FooterOffset 28.346456692913385 def
/FooterPad    0 def
/FooterLines  2 def
/ShowNofN           true def
/SwitchHeader       false def
/PrintOnlyOneHeader false def
/PrintHeader        true def
/PrintHeaderFrame   true def
/HeaderFrameProperties [0.000 0.900 0.400 0.000 0.000 ]def
/PrintFooter        false def
/PrintFooterFrame   true def
/FooterFrameProperties [0.000 0.900 0.400 0.000 0.000 ]def
/LineSpacing      0 def
/ParagraphSpacing 0 def
/LineHeight       9.495000000000001 def
/LinesPerColumn   68 def
/WarnPaperSize    true def
/Zebra            false def
/PrintLineNumber  false def
/SyncLineZebra    false def
/ZebraFollow      0 def
/PrintLineStep    1 def
/PrintLineStart   1 def
/LineNumberColor  [0.000 0.000 0.000] def
/ZebraHeight      3 def
/ZebraColor       0.950 def
/BackgroundColor  [1.000 1.000 1.000] def
/UseSetpagedevice false def

/PageWidth PrintPageWidth LeftMargin add RightMargin add def

/N-Up           1 def
/N-Up-Landscape false def
/N-Up-Border    true def
/N-Up-Lines     1 def
/N-Up-Columns   1 def
/N-Up-Missing   0 def
/N-Up-Margin    28.346456692913385 def
/N-Up-Repeat    N-Up-Lines def
/N-Up-End       N-Up-Columns def
/N-Up-XColumn   PageWidth def
/N-Up-YColumn   0 def
/N-Up-XLine     N-Up-End 1 sub PageWidth mul neg def
/N-Up-YLine     LandscapePageHeight neg def
/N-Up-XStart    0 def
/N-Up-YStart    0 def

% === BEGIN ps-print prologue 1
% version: 6.0

% Copyright (C) 2000, 2001  Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
% GNU Emacs 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, or (at your option)
% any later version.
%
% GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to the
% Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.

% As a special exception, the copyright holders of this module give
% you permission to include the module in a Postscript file generated
% by Emacs or other free software together with the result of
% converting text to be printed, regardless of the license terms of
% that text, and to use under terms of your choice the page images
% resulting from formatting said combination.  If you modify this
% module, you may extend this exception to your version of the module
% but you are not obligated to do so.  If you do not wish to do so,
% delete this exception statement from your version.

% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
/ISOLatin1Encoding where{pop}{
% -- The ISO Latin-1 encoding vector isn't known, so define it.
% -- The first half is the same as the standard encoding,
% -- except for minus instead of hyphen at code 055.
/ISOLatin1Encoding
StandardEncoding 0 45 getinterval aload pop
    /minus
StandardEncoding 46 82 getinterval aload pop
%*** NOTE: the following are missing in the Adobe documentation,
%*** but appear in the displayed table:
%*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.
% 0200 (128)
    /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
    /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
    /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent
    /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron
% 0240 (160)
    /space/exclamdown/cent/sterling
	/currency/yen/brokenbar/section
    /dieresis/copyright/ordfeminine/guillemotleft
	/logicalnot/hyphen/registered/macron
    /degree/plusminus/twosuperior/threesuperior
	/acute/mu/paragraph/periodcentered
    /cedilla/onesuperior/ordmasculine/guillemotright
	/onequarter/onehalf/threequarters/questiondown
% 0300 (192)
    /Agrave/Aacute/Acircumflex/Atilde
	/Adieresis/Aring/AE/Ccedilla
    /Egrave/Eacute/Ecircumflex/Edieresis
	/Igrave/Iacute/Icircumflex/Idieresis
    /Eth/Ntilde/Ograve/Oacute
	/Ocircumflex/Otilde/Odieresis/multiply
    /Oslash/Ugrave/Uacute/Ucircumflex
	/Udieresis/Yacute/Thorn/germandbls
% 0340 (224)
    /agrave/aacute/acircumflex/atilde
	/adieresis/aring/ae/ccedilla
    /egrave/eacute/ecircumflex/edieresis
	/igrave/iacute/icircumflex/idieresis
    /eth/ntilde/ograve/oacute
	/ocircumflex/otilde/odieresis/divide
    /oslash/ugrave/uacute/ucircumflex
	/udieresis/yacute/thorn/ydieresis
256 packedarray def
}ifelse

/reencodeFontISO{ %def
  dup
  length 12 add dict	% Make a new font (a new dict the same size
			% as the old one) with room for our new symbols.

  begin			% Make the new font the current dictionary.

    % Copy each of the symbols from the old dictionary
    % to the new one except for the font ID.
    {1 index/FID ne{def}{pop pop}ifelse}forall

    % Override the encoding with the ISOLatin1 encoding.
    currentdict/FontType get 0 ne{/Encoding ISOLatin1Encoding def}if

    % Use the font's bounding box to determine the ascent, descent,
    % and overall height; don't forget that these values have to be
    % transformed using the font's matrix.

%          ^    (x2 y2)
%          |       |
%          |       v
%          |  +----+ - -
%          |  |    |   ^
%          |  |    |   | Ascent (usually > 0)
%          |  |    |   |
% (0 0) -> +--+----+-------->
%             |    |   |
%             |    |   v Descent (usually < 0)
% (x1 y1) --> +----+ - -

    currentdict/FontType get 0 ne
    {/FontBBox load aload pop			% -- x1 y1 x2 y2
     FontMatrix transform/Ascent  exch def pop
     FontMatrix transform/Descent exch def pop}
    {/PrimaryFont FDepVector 0 get def
     PrimaryFont/FontBBox get aload pop
     PrimaryFont/FontMatrix get transform/Ascent exch def pop
     PrimaryFont/FontMatrix get transform/Descent exch def pop}ifelse

    /FontHeight Ascent Descent sub def	% use `sub' because descent < 0

    % Define these in case they're not in the FontInfo
    % (also, here they're easier to get to).
    /UnderlinePosition  Descent 0.70 mul def
    /OverlinePosition   Descent UnderlinePosition sub Ascent add def
    /StrikeoutPosition  Ascent 0.30 mul def
    /LineThickness      FontHeight 0.05 mul def
    /Xshadow            FontHeight  0.08 mul def
    /Yshadow            FontHeight -0.09 mul def
    /SpaceBackground    Descent neg UnderlinePosition add def
    /XBox               Descent neg def
    /YBox               LineThickness 0.7 mul def

    currentdict		% Leave the new font on the stack
    end			% Stop using the font as the current dictionary.
    definefont		% Put the font into the font dictionary
    pop			% Discard the returned font.
}bind def

% Font definition
/DefFont{findfont exch scalefont reencodeFontISO}def

% Font selection
/F{
  findfont
  dup/Ascent            get/Ascent            exch def
  dup/Descent           get/Descent           exch def
  dup/FontHeight        get/FontHeight        exch def
  dup/UnderlinePosition get/UnderlinePosition exch def
  dup/OverlinePosition  get/OverlinePosition  exch def
  dup/StrikeoutPosition get/StrikeoutPosition exch def
  dup/LineThickness     get/LineThickness     exch def
  dup/Xshadow           get/Xshadow           exch def
  dup/Yshadow           get/Yshadow           exch def
  dup/SpaceBackground   get/SpaceBackground   exch def
  dup/XBox              get/XBox              exch def
  dup/YBox              get/YBox              exch def
  setfont
}def

/FG/setrgbcolor load def

/bg false def
/BG{
  dup/bg exch def
  {[4 1 roll]}
  {[1.0 1.0 1.0]}
  ifelse
  /bgcolor exch def
}def

%  B    width    C
%   +-----------+
%               | Ascent  (usually > 0)
% A +           +
%               | Descent (usually < 0)
%   +-----------+
%  E    width    D

/dobackground{				% width --
  currentpoint				% -- width x y
  gsave
    newpath
    moveto				% A (x y)
    0 Ascent rmoveto			% B
    dup 0 rlineto			% C
    0 Descent Ascent sub rlineto	% D
    neg 0 rlineto			% E
    closepath
    FillBgColor
  grestore
}def

/eolbg{					% dobackground until right margin
  PrintWidth				% -- x-eol
  currentpoint pop			% -- cur-x
  sub					% -- width until eol
  dobackground
}def

/LineHS LineHeight LineSpacing add def
/ParagraphHS LineHeight ParagraphSpacing add def
/PSL{/h exch def bg{eolbg}if  0  currentpoint exch pop h sub  moveto}def
/PLN{PrintLineNumber{doLineNumber}if}def

/SL{LineHS PSL isLineStep pop}def	% Soft Linefeed

/PHL{ParagraphHS PSL PLN}def		% Paragraph Hard Linefeed
/LHL{LineHS PSL PLN}def			% Hard Linefeed

% Some debug
/dcp{currentpoint exch 40 string cvs print(, )print =}def
/dp{print 2 copy  exch 40 string cvs print(, )print =}def

/W{
  ( )stringwidth	% Get the width of a space in the current font.
  pop			% Discard the Y component.
  mul			% Multiply the width of a space
			% by the number of spaces to plot
  bg{dup dobackground}if
  0 rmoveto
}def

/Effect          0 def
/EffectUnderline false def
/EffectStrikeout false def
/EffectOverline  false def
/EffectShadow    false def
/EffectBox       false def
/EffectOutline   false def

% effect: 1  - underline  2   - strikeout  4  - overline
%         8  - shadow     16  - box        32 - outline
/EF{
  /Effect exch def
  /EffectUnderline Effect 1  and 0 ne def
  /EffectStrikeout Effect 2  and 0 ne def
  /EffectOverline  Effect 4  and 0 ne def
  /EffectShadow    Effect 8  and 0 ne def
  /EffectBox       Effect 16 and 0 ne def
  /EffectOutline   Effect 32 and 0 ne def
}def

% stack:  string  |-  --
/S{
  /xx currentpoint dup Descent add/yy exch def
  Ascent add/YY exch def def
  dup stringwidth pop xx add/XX exch def
  EffectShadow{
    /yy yy Yshadow add def
    /XX XX Xshadow add def
  }if
  bg{
    true
    EffectBox
      {SpaceBackground doBox}
      {xx yy XX YY doRect}
    ifelse
  }if						% background
  EffectBox      {false 0 doBox}if		% box
  EffectShadow   {dup doShadow}if		% shadow
  EffectOutline
    {true doOutline}				% outline
    {show}					% normal text
  ifelse
  EffectUnderline{UnderlinePosition Hline}if	% underline
  EffectStrikeout{StrikeoutPosition Hline}if	% strikeout
  EffectOverline {OverlinePosition  Hline}if	% overline
}bind def

% stack:  position  |-  --
/Hline{
  currentpoint exch pop add dup
  gsave
  newpath
  xx exch moveto
  XX exch lineto
  closepath
  LineThickness setlinewidth stroke
  grestore
}bind def

% stack:  fill-or-not delta  |-  --
/doBox{
  /dd exch def
  xx XBox sub dd sub yy YBox sub dd sub
  XX XBox add dd add YY YBox add dd add
  doRect
}bind def

% stack:  fill-or-not lower-x lower-y upper-x upper-y  |-  --
/doRect{
  /rYY exch def
  /rXX exch def
  /ryy exch def
  /rxx exch def
  gsave
  newpath
  rXX rYY moveto
  rxx rYY lineto
  rxx ryy lineto
  rXX ryy lineto
  closepath
  % top of stack: fill-or-not
  {FillBgColor}
  {LineThickness setlinewidth stroke}ifelse
  grestore
}bind def

% stack:  string  |-  --
/doShadow{
  gsave
  Xshadow Yshadow rmoveto
  false doOutline
  grestore
}bind def

/st 1 string def

% stack:  string fill-or-not  |-  --
/doOutline{
  /-fillp- exch def
  /-ox- currentpoint/-oy- exch def def
  gsave
  LineThickness setlinewidth
  {st 0 3 -1 roll put
   st dup true charpath
   -fillp- {gsave FillBgColor grestore}if
   stroke stringwidth
   -oy- add/-oy- exch def
   -ox- add/-ox- exch def
   -ox- -oy- moveto
  }forall
  grestore
  -ox- -oy- moveto
}bind def

% stack:  --
/FillBgColor{bgcolor aload pop setrgbcolor fill}bind def

% stack:  -- |- boolean
/isLineStep{
  SyncLineZebra
  {PLScounter 0 gt						% or zebra
   {/PLScounter PLScounter 1 sub def PLScounter 0 eq}
   {false}ifelse
   PrintLineStep 1 gt
   {/PrintLineStep PrintLineStep 1 sub def}
   {/PrintLineStep ZebraHeight def
    /PLScounter PrintLineStart def}ifelse}
  {LineNumber PrintLineStart sub PrintLineStep mod 0 eq}ifelse	% or line step
}def

% stack:  --
/doLineNumber{
  /LineNumber where
  {pop
   isLineStep			% or line step
   LineNumber Lines ge or	% or last line
   {currentfont
    gsave
    LineNumberColor SetColor
    /L0 findfont setfont
    LineNumber Lines ge
    {(end      )}
    {LineNumber 6 string cvs(      )strcat}ifelse
    dup stringwidth pop neg 0 rmoveto
    show
    grestore
    setfont}if
    /LineNumber LineNumber 1 add def
  }if
}def

% stack: color-specifier |- --
/SetColor{dup type/realtype eq{setgray}{aload pop setrgbcolor}ifelse}def

% stack: --
/printZebra{
  gsave
  ZebraColor SetColor
  /double-zebra ZebraHeight ZebraHeight add def
  /yiter double-zebra LineHS mul neg def
  /xiter PrintWidth InterColumn add def
  /zebra-line LinesPrinted def
  NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
  grestore
}def

% stack:  lines-per-column |- --
/doColumnZebra{
  /lpc exch def
  gsave
  ZebraFollow 1 and 0 ne{
    /H ZebraHeight zebra-line ZebraHeight mod sub def
    /lpc lpc H sub def
    zebra-line double-zebra mod ZebraHeight lt
    {H doZebra	% "black" stripe followed by a "white" stripe
     /lpc lpc ZebraHeight sub def
     H ZebraHeight add}
    {H}ifelse	% "white" stripe
    LineHS mul neg 0 exch rmoveto
    /zebra-line zebra-line LinesPerColumn add def
  }if
  /zspacing 0 def
  lpc dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
  double-zebra mod dup 0 le{pop}
  {dup ZebraHeight gt
   {pop ZebraHeight}
   {/zspacing LineSpacing def
    ZebraFollow 2 and 0 ne{pop ZebraHeight}if}ifelse
   doZebra}ifelse
  grestore
}def

% stack:  zebra-height (in lines) |- --
/doZebra{
  /zh exch 0.05 sub LineHS mul zspacing sub def
  gsave
  0 LineHeight 0.65 mul rmoveto
  PrintWidth 0 rlineto
  0 zh neg rlineto
  PrintWidth neg 0 rlineto
  0 zh rlineto
  fill
  grestore
}def

% stack: --
/printBackground{
  /BackgroundColor where{
    pop gsave BackgroundColor SetColor
    NumberOfColumns{
     gsave
     0 LineHeight 0.65 mul rmoveto
     PrintWidth 0 rlineto
     0 PrintHeight neg rlineto
     PrintWidth neg 0 rlineto
     0 PrintHeight rlineto
     fill
     grestore
     PrintWidth InterColumn add 0 rmoveto
    }repeat
    grestore
  }if
}def

% tx ty rotation xscale yscale xpos ypos BeginBackImage
/BeginBackImage{
  /-save-image- save def
  /showpage{}def
  translate
  scale
  rotate
  translate
}def

/EndBackImage{-save-image- restore}def

% string fontsize fontname rotation gray xpos ypos ShowBackText
/ShowBackText{
  gsave
  translate
  setgray
  rotate
  findfont exch dup/-offset- exch -0.25 mul def scalefont setfont
  0 -offset- moveto
  /-saveLineThickness- LineThickness def
  /LineThickness 1 def
  false doOutline
  /LineThickness -saveLineThickness- def
  grestore
}def

/SetPageSize{
  BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark
setpagedevice
}def

/BeginDoc{
  % ---- Remember space width of the normal text font `f0'.
  /SpaceWidth/f0 findfont setfont( )stringwidth pop def
  % ---- save the state of the document (useful for ghostscript!)
  /docState save def
  % ---- [andrewi] set PageSize based on chosen dimensions
  UseSetpagedevice{
   WarnPaperSize{SetPageSize}{mark{SetPageSize}stopped cleartomark}ifelse
  }if
  /ColumnWidth PrintWidth InterColumn add def
  % ---- define where  printing will start
  /f0 F					% this installs Ascent
  /PrintStartY PrintHeight Ascent sub def
  /ColumnIndex 1 def
  /N-Up-Counter N-Up-End 1 sub def
  /PLScounter PrintLineStart def
}def

/EndDoc{
  % ---- restore the state of the document (useful for ghostscript!)
  docState restore
}def

/BeginDSCPage{
  % ---- when 1st column, save the state of the page
  ColumnIndex 1 eq{/pageState save def}if
  % ---- save the state of the column
  /columnState save def
}def

/PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def

/BeginPage{
  /LinesPrinted exch def
  % ---- when 1st column, print all background effects
  ColumnIndex 1 eq{
    0 PrintStartY moveto		% move to where printing will start
    printBackground
    Zebra{printZebra}if
    printGlobalBackground
    printLocalBackground
  }if
  PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse
  dup PrintHeader and{
    PrintHeaderFrame{HeaderFrame}if
    HeaderText
  }if
  PrintFooter and{
    PrintFooterFrame{FooterFrame}if
    FooterText
  }if
  0 PrintStartY moveto			% move to where printing will start
  /LineNumber where
  {pop
   SyncLineZebra
   {/H PageNumber 1 sub NumberOfColumns mul ColumnIndex 1 sub add
       LinesPerColumn mul ZebraHeight mod def
    /PLScounter H PrintLineStart ge{0}{PrintLineStart H sub}ifelse def
    /PrintLineStep ZebraHeight H sub def}if}if
  PLN
}def

/EndPage{bg{eolbg}if}def

/EndDSCPage{
  ColumnIndex NumberOfColumns eq{
    % ---- restore the state of the page
    pageState restore
    /ColumnIndex 1 def
    % ---- N-up printing
    N-Up 1 gt{
      N-Up-Counter 0 gt
      {% ---- Next page on same row
	/N-Up-Counter N-Up-Counter 1 sub def
	N-Up-XColumn N-Up-YColumn}
      {% ---- Next page on next line
	/N-Up-Counter N-Up-End 1 sub def
	N-Up-XLine N-Up-YLine}ifelse
      translate
    }if
  }{ % else
    % ---- restore the state of the current column
    columnState restore
    % ---- and translate to the next column
    ColumnWidth 0 translate
    /ColumnIndex ColumnIndex 1 add def
  }ifelse
}def

/TextStart{
  LeftMargin BottomMargin
  PrintFooter{
    FooterPad add
    FooterLines FooterLineHeight mul add
    FooterPad add
    FooterOffset add}if
}def

% stack: number-of-pages-per-sheet |- --
/BeginSheet{
  /sheetState save def
  /pages-per-sheet exch def

  % ---- translate to bottom-right corner of Portrait page
  LandscapeMode{
    LandscapePageHeight 0 translate
    90 rotate
  }if
  % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7
  /JackGhostscript where{pop 1 27.7 29.7 div scale}if
  UpsideDown{PageWidth LandscapePageHeight translate 180 rotate}if
  % ---- N-Up printing
  N-Up 1 gt{
    % ---- landscape
    N-Up-Landscape{
      PageWidth 0 translate
      90 rotate
    }if
    N-Up-Margin dup translate
    % ---- scale
    LandscapeMode{
      /HH PageWidth def
      /WW LandscapePageHeight def
    }{
      /HH LandscapePageHeight def
      /WW PageWidth def
    }ifelse
    /xx 0 def
    N-Up-Landscape{
      /ww WW WW mul N-Up-Lines HH mul div def
      /cc HH N-Up-Columns N-Up-Missing add div def
      ww cc gt{/xx WW def/WW cc ww div WW mul def/xx xx WW sub def}if
    }{
      /hh HH N-Up-Columns N-Up-Missing add div def
      /cc HH N-Up-Lines div def
      hh cc gt{/xx WW def/WW cc hh div WW mul def/xx xx WW sub def}if
    }ifelse
    WW N-Up-Margin sub N-Up-Margin sub
    N-Up-Landscape
    {N-Up-Lines div HH}
    {N-Up-Columns N-Up-Missing add div WW}ifelse
    div dup scale
    LandscapeMode{/yy 0 def}{/yy xx def/xx 0 def}ifelse
    xx N-Up-Repeat 1 sub LandscapePageHeight mul yy add translate
    % ---- go to start position in page matrix
    N-Up-XStart N-Up-Missing 0.5 mul
    LandscapeMode
    {LandscapePageHeight mul N-Up-YStart add}
    {PageWidth mul add N-Up-YStart}ifelse
    translate
  }if
  % ---- translate to lower left corner of TEXT
  TextStart translate

  % ---- N-up printing
  N-Up 1 gt N-Up-Border and pages-per-sheet 0 gt and{
    % ---- page border
    gsave
    0 setgray
    TextStart exch neg exch neg moveto
    N-Up-Repeat
    {N-Up-End
     {gsave
      PageWidth 0 rlineto
      0 LandscapePageHeight rlineto
      PageWidth neg 0 rlineto
      closepath stroke
      grestore
      /pages-per-sheet pages-per-sheet 1 sub def
      pages-per-sheet 0 le{exit}if
      N-Up-XColumn N-Up-YColumn rmoveto
     }repeat
     pages-per-sheet 0 le{exit}if
     N-Up-XLine N-Up-XColumn sub N-Up-YLine rmoveto
    }repeat
    grestore
  }if
}def

/EndSheet{
  showpage
  sheetState restore
}def

/SetHeaderLines{			% nb-lines --
  /HeaderLines exch def
  % ---- bottom up
  HeaderPad
  HeaderLines 1 sub HeaderLineHeight mul add
  HeaderTitleLineHeight add
  HeaderPad add
  /HeaderHeight exch def
}def

/SetFooterLines{			% nb-lines --
  /FooterLines exch def
  % ---- bottom up
  FooterPad
  FooterLines FooterLineHeight mul add
  FooterPad add
  /FooterHeight exch def
}def

% |---------|
% |  tm     |
% |---------|
% |  header |
% |-+-------| <-- (x y)
% |  ho     |
% |---------|
% |  text   |
% |---------|
% |  fo     |
% |---------|
% |  footer |
% |-+-------| <-- (0 0)
% |  bm     |
% |---------|

% -- |- x y
/HeaderFrameStart{0  PrintHeight HeaderOffset add}def
/FooterFrameStart{0  FooterHeight FooterOffset add neg}def

/doFramePath{
  /h exch def
  PrintHeaderWidth	0	rlineto
  0			h	rlineto
  PrintHeaderWidth neg	0	rlineto
  0			h neg	rlineto
}def

/HeaderFramePath{HeaderHeight doFramePath}def
/FooterFramePath{FooterHeight doFramePath}def

% /path-fun /start-fun vector-property doFrame
/doFrame{
  /vecFrame exch def
  /startFrame exch load def
  /pathFrame exch load def
  gsave
    vecFrame 2 get setlinewidth				% frame border width
    % ---- do the shadow of the next rectangle
    startFrame moveto
    1 -1 rmoveto
    pathFrame
    vecFrame 4 get SetColor fill			% frame shadow color
    % ---- do the next rectangle ...
    startFrame moveto
    pathFrame
    gsave vecFrame 1 get SetColor fill grestore		% frame background
    gsave vecFrame 3 get SetColor stroke grestore	% frame border color
  grestore
}def

/HeaderFrame{/HeaderFramePath /HeaderFrameStart HeaderFrameProperties doFrame}def
/FooterFrame{/FooterFramePath /FooterFrameStart FooterFrameProperties doFrame}def

/HeaderStart{
  HeaderFrameStart
  exch HeaderPad add exch	% horizontal pad
  % ---- bottom up
  HeaderPad add			% vertical   pad
  HeaderDescent sub
  HeaderLineHeight HeaderLines 1 sub mul add
}def

/FooterStart{
  FooterFrameStart
  exch FooterPad add exch	% horizontal pad
  % ---- bottom up
  FooterPad add			% vertical   pad
  FooterDescent sub
  FooterLineHeight FooterLines 1 sub mul add
}def

/strcat{
  dup length 3 -1 roll dup length dup 4 -1 roll add string dup
  0 5 -1 roll putinterval
  dup 4 2 roll exch putinterval
}def

/pagenumberstring{
  PageNumber 32 string cvs
  ShowNofN{(/)strcat PageCount 32 string cvs strcat}if
}def

% lines is-right HeaderOrFooterTextLines
/HeaderOrFooterTextLines{
  /is_right exch def
  HFStart moveto
  { % ---- process the lines
   aload pop
   exch F
   gsave
    dup xcheck{exec}if
    is_right{
     dup stringwidth pop
     PrintHeaderWidth exch sub HFPad HFPad add sub 0 rmoveto
    }if
    HFColor SetColor
    show
   grestore
   0 HFLineHeight neg rmoveto
  }forall
}def

% right-lines left-lines /start lineheight pad fore-color HeaderOrFooterText
/HeaderOrFooterText{
  /HFColor exch def
  /HFPad exch def
  /HFLineHeight exch def
  /HFStart exch load def

  % -- rightLines leftLines -- at stack

  % ---- hack: `PN 1 and'  ==  `PN 2 modulo'
  % ---- if even page number and duplex, then exchange left and right
  PageNumber 1 and 0 eq SwitchHeader and{exch}if

  % ---- process the left lines
  false HeaderOrFooterTextLines

  % ---- process the right lines
  true HeaderOrFooterTextLines
}def

/HeaderText{
  HeaderLinesRight HeaderLinesLeft
  /HeaderStart HeaderLineHeight HeaderPad
  HeaderFrameProperties 0 get
  HeaderOrFooterText
}def

/FooterText{
  FooterLinesRight FooterLinesLeft
  /FooterStart FooterLineHeight FooterPad
  FooterFrameProperties 0 get
  HeaderOrFooterText
}def

/ReportFontInfo{
  2 copy
  /t0 3 1 roll DefFont
  /t0 F
  /lh FontHeight def
  /sw( )stringwidth pop def
  /aw(01234567890abcdefghijklmnopqrstuvwxyz)dup length exch
  stringwidth pop exch div def
  /t1 12/Helvetica-Oblique DefFont
  /t1 F
  gsave
    (languagelevel = )show
    languagelevel 32 string cvs show
  grestore
  0 FontHeight neg rmoveto
  gsave
    (For )show
    128 string cvs show
    ( )show
    32 string cvs show
    ( point, the line height is )show
    lh 32 string cvs show
    (, the space width is )show
    sw 32 string cvs show
    (,)show
  grestore
  0 FontHeight neg rmoveto
  gsave
    (and a crude estimate of average character width is )show
    aw 32 string cvs show
    (.)show
  grestore
  0 FontHeight neg rmoveto
}def

% cm to point
/cm{72 mul 2.54 div}def

/ReportAllFontInfo{
  % key = font name   value = font dictionary
  FontDirectory{pop 10 exch ReportFontInfo}forall
}def

% 3 cm 20 cm moveto  10/Courier ReportFontInfo  showpage
% 3 cm 20 cm moveto  ReportAllFontInfo          showpage

% === END ps-print prologue 1

/printGlobalBackground{
}def
/printLocalBackground{
}def
/h0 14(Helvetica-Bold)cvn DefFont
/h1 12(Helvetica)cvn DefFont
/L0 6(Times-Italic)cvn DefFont
/H0 12(Helvetica)cvn DefFont


% ---- These lines must be kept together because...

/h0 F
/HeaderTitleLineHeight FontHeight def

/h1 F
/HeaderLineHeight FontHeight def
/HeaderDescent    Descent def

/H0 F
/FooterLineHeight FontHeight def
/FooterDescent    Descent def

% ---- ...because `F' has a side-effect on `FontHeight' and `Descent'

/f0 9(Courier)cvn DefFont
/f1 9(Courier-Bold)cvn DefFont
/f2 9(Courier-Oblique)cvn DefFont
/f3 9(Courier-BoldOblique)cvn DefFont
/SpaceWidthRatio 0.600000 def

%%EndProlog

%%BeginSetup

%%BeginFeature: *ManualFeed False
BMark /ManualFeed false EMark setpagedevice
%%EndFeature

BeginDoc
%%EndSetup

%%Page: 1 1
/Lines 9 def
/PageCount 1 def
1 BeginSheet
BeginDSCPage
/LineNumber 1 def
/PageNumber 1 def
/HeaderLinesLeft[
 [/h0 (t2.text)]
 [/h1 (~/)]
]def
/HeaderLinesRight[
 [/h0 /pagenumberstring load]
 [/h1 (04/16/2006)]
]def
2 SetHeaderLines
0 BeginPage
/f0 F
false BG
0.000 0.000 0.000 FG
0 EF
(Founded in 1969, the Trail Association was formed under the guidance) S
LHL
(of the California State Parks and Sempervirens Fund \(a non-profit land) S
LHL
(conservancy\) to build and maintain trails in the Santa Cruz) S
LHL
(Mountains. The building of the Skyline-to-the-Sea Trail that year) S
LHL
(inaugurated Trail Days in the Santa Cruz Mountains. Since then our) S
LHL
(activities have broadened to include weekly hikes. Trail building) S
LHL
(activities have become integral to the survival of the Santa Cruz) S
LHL
(Mountains as a recreational resource.) S
PHL
EndPage
EndDSCPage
EndSheet

%%Trailer
%%Pages: 1

EndDoc

%%EOF
Comment 1 Hin-Tak Leung 2006-04-16 12:21:01 UTC
Created attachment 2157 [details]
the postscript file, as an attachment

The postscript file as an attachment.

It works just fine with gs v8.53 x86.
Comment 2 Hin-Tak Leung 2006-04-16 12:32:06 UTC
Seem to be a bug specific to ESP ghostscript. The appropriate place to file 
a bug would be www.cups.org, rather than here. Stefan, you want to close the 
bug as invalid?

On fedora 5 x86_64, ESP ghostscript 8.15.1 breaks and AFPL 8.53 works:
==============================================
 $ /usr/local/bin/gs -sDEVICE=nullpage -dNOPAUSE -dBATCH
bugs.ghostscript.com/attachment.cgi\?id\=2157\&action\=view 
 
AFPL Ghostscript 8.53 (2005-10-20)
Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Regu font from /usr/share/fonts/default/Type1/n022003l.pfb...
2259488 954081 1476580 181716 1 done.
Loading NimbusSanL-Bold font from /usr/share/fonts/default/Type1/n019004l.pfb...
2396728 1082564 1556964 258283 1 done.
Using NimbusSansL-Bold font for NimbusSanL-Bold.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb...
2513872 1206883 1556964 261087 1 done.
Using NimbusSansL-Regu font for NimbusSanL-Regu.
Loading NimbusRomNo9L-ReguItal font from
/usr/share/fonts/default/Type1/n021023l.pfb... 2711400 1390676 1556964 263400 1
done.
Loading NimbusMonL-Bold font from /usr/share/fonts/default/Type1/n022004l.pfb...
2908928 1588065 1577060 272117 1 done.
Loading NimbusMonL-ReguObli font from
/usr/share/fonts/default/Type1/n022023l.pfb... 3086360 1758128 1577060 274189 1
done.
Loading NimbusMonL-BoldObli font from
/usr/share/fonts/default/Type1/n022024l.pfb... 3263792 1892420 1577060 226412 1
done.
$ /usr/bin/gs -sDEVICE=nullpage -dNOPAUSE -dBATCH
bugs.ghostscript.com/attachment.cgi\?id\=2157\&action\=view 
ESP Ghostscript 815.01 (2005-09-22)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Regu font from /usr/share/fonts/default/Type1/n022003l.pfb...
3496936 1746602 1538088 239652 1 done.
Loading NimbusSanL-Bold font from /usr/share/fonts/default/Type1/n019004l.pfb...
3536984 1875829 1676088 377015 1 done.
Using NimbusSansL-Bold font for NimbusSanL-Bold.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb...
3570264 2019924 1676088 381791 1 done.
Using NimbusSansL-Regu font for NimbusSanL-Regu.
Loading NimbusRomNo9L-ReguItal font from
/usr/share/fonts/default/Type1/n021023l.pfb... 3609608 2204525 1676088 387692 1
done.
Loading NimbusMonL-Bold font from /usr/share/fonts/default/Type1/n022004l.pfb...
3729000 2409426 1696272 402533 1 done.
Loading NimbusMonL-ReguObli font from
/usr/share/fonts/default/Type1/n022023l.pfb... 3923752 2601649 1716456 409277 1
done.
Loading NimbusMonL-BoldObli font from
/usr/share/fonts/default/Type1/n022024l.pfb... 4138688 2814893 1716456 412561 1
done.

Unexpected interpreter error -8.
Error object: (f80)op(0)0x388f51a8b0
Operand stack at 0x537ed0:
0x520c18: 0x02 dict -nLwrx--- 0x0052 0x007f6048
Execution stack at 0x537e68:
0x523ee8: 0x0f oper --F---e-- 0x0000 0x388f50bf20 = %interp_exit
0x523ef8: 0x0d name --S---e-- 0x03f6 0x0055b318 = .runexec2
0x523f08: 0x03 file --G-rx--- 0x0001 0x0075be70
0x523f18: 0x05 mpry --G-rxe-- 0x0006 0x00562070
0x523f28: 0x0e null --F---e-- 0x0003 0x388f519110
0x523f38: 0x0e null --F------ 0x0050 0x388f8764c0
0x523f48: 0x0b int  --F------ 0x0568 0x00000002 = 2
0x523f58: 0x0f oper --F---e-- 0x0000 0x388f5190b0 = %stopped_push
0x523f68: 0x03 file --G-rxe-- 0x0001 0x0075be70
0x523f78: 0x05 mpry --G-rxe-- 0x0002 0x005643b8
0x523f88: 0x06 spry --G-rxe-- 0x0002 0x0056435a
Dictionary stack at 0x537dd0:
0x537828: 0x02 dict --Gwrx--- 0x0000 0x0050eb48
0x537838: 0x02 dict --Gwrx--- 0x0000 0x00593db0
0x537848: 0x02 dict --Lwrx--- 0x0000 0x0051ca60
======================================================
Comment 3 Hin-Tak Leung 2006-04-16 12:44:24 UTC
Since the current v8.53 work just fine, and the problem belongs
to EPS ghostscript which is maintained by the CUPS people rather than
the ghostscript folks, please file the problem at www.cups.org instead.
AFPL 8.14 also works just fine.

=====================
$ usr/bin/gs -sDEVICE=nullpage -dBATCH -dNOPAUSE ps-buffer.ps
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb...
2185268 866585 1456484 168254 1 done.
Loading NimbusSanL-Bold font from /usr/share/ghostscript/fonts/n019004l.pfb...
2282316 966412 1516772 230132 1 done.
Loading NimbusSanL-Regu font from /usr/share/ghostscript/fonts/n019003l.pfb...
2379364 1057712 1536868 235770 1 done.
Loading NimbusRomNo9L-ReguItal font from
/usr/share/ghostscript/fonts/n021023l.pfb... 2516604 1194851 1536868 238117 1 done.
Loading NimbusMonL-Bold font from /usr/share/ghostscript/fonts/n022004l.pfb...
2673940 1347761 1536868 243492 1 done.
Loading NimbusMonL-ReguObli font from
/usr/share/ghostscript/fonts/n022023l.pfb... 2791084 1474594 1536868 245558 1 done.
Loading NimbusMonL-BoldObli font from
/usr/share/ghostscript/fonts/n022024l.pfb... 2948420 1620110 1536868 247596 1 done.
$
=======================