Bug 689322 - Emacs ps-print files no longer work in gs
Summary: Emacs ps-print files no longer work in gs
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Default assignee
URL: http://www.cups.org/str.php?L1570
Depends on:
Blocks: 689315
  Show dependency tree
Reported: 2007-07-04 05:10 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Word Size: ---

Let Ghostscript handle a Postscript file with manual feed setting correctly (4.14 KB, patch)
2007-07-04 05:11 UTC, Till Kamppeter
Details | Diff
Offending PS file (31.94 KB, application/postscript)
2007-07-04 08:41 UTC, Till Kamppeter

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2007-07-04 05:10:01 UTC



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





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:



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 :
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:


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

In addition I ran

/home/mhd: gs t2-home.ps run
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...
2439776 1023053 1476580 183845 1 done.
Loading NimbusSanL-Bold font from /usr/share/fonts/default/Type1/n019004l.pfb...
2456440 1128392 1556964 261045 1 done.
Using NimbusSansL-Bold font for NimbusSanL-Bold.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb...
2553488 1252483 1556964 263849 1 done.
Using NimbusSansL-Regu font for NimbusSanL-Regu.
Loading NimbusRomNo9L-ReguItal font from
/usr/share/fonts/default/Type1/n021023l.pfb... 2751016 1436296 1556964 266162 1
Loading NimbusMonL-Bold font from /usr/share/fonts/default/Type1/n022004l.pfb...
2948544 1633685 1577060 274879 1 done.
Loading NimbusMonL-ReguObli font from
/usr/share/fonts/default/Type1/n022023l.pfb... 3125976 1803748 1577060 276951 1
Loading NimbusMonL-BoldObli font from
/usr/share/fonts/default/Type1/n022024l.pfb... 3303408 1990816 1577060 278995 1
>>showpage, press <return> to continue<<

Unexpected interpreter error -8.
Error object: (f80)op(0)0x5100180
Operand stack at 0x9af4990:
0x9ae8fac: 0x02 dict -nLwrx--- 0x050f 0x09c9f574
Execution stack at 0x9af4954:
0x9aea914: 0x0f oper --F---e-- 0x0000 0x050f0580 = %interp_exit
0x9aea91c: 0x0d name --S---e-- 0x03f6 0x09ad8a6c = .runexec2
0x9aea924: 0x03 file --G-rx--- 0x0001 0x09c4ac00
0x9aea92c: 0x05 mpry --G-rxe-- 0x0006 0x09b0c884
0x9aea934: 0x0e null --F---e-- 0x0003 0x050fea30
0x9aea93c: 0x0e null --F------ 0x052b 0x09ad3b14
0x9aea944: 0x0b int  --F------ 0x0002 0x00000002 = 2
0x9aea94c: 0x0f oper --F---e-- 0x0000 0x050fe9c0 = %stopped_push
0x9aea954: 0x03 file --G-rxe-- 0x0001 0x09c4ac00
0x9aea95c: 0x05 mpry --G-rxe-- 0x0002 0x09b0d284
0x9aea964: 0x06 spry --G-rxe-- 0x0002 0x09b0d24a
Dictionary stack at 0x9af48fc:
0x9af45b4: 0x02 dict --Gwrx--- 0x0000 0x09adb104
0x9af45bc: 0x02 dict --Gwrx--- 0x0000 0x09b2dd20
0x9af45c4: 0x02 dict --Lwrx--- 0x0000 0x09ae4a78

Patch to fix this is attached.
Comment 1 Till Kamppeter 2007-07-04 05:11:21 UTC
Created attachment 3141 [details]
Let Ghostscript handle a Postscript file with manual feed setting correctly
Comment 2 Alex Cherepanov 2007-07-04 06:51:10 UTC
Please attach a sample file. 
"<</ManualFeed false >> setpagedevice" works.
Comment 3 Till Kamppeter 2007-07-04 08:41:50 UTC
Created attachment 3148 [details]
Offending PS file

I have attached the sample file of the original bug report.

gs -sDEVICE=x11 t2-home.ps


gv t2-home.ps

works for me with a recent GPL GS SVN snapshot. Perhaps something new in
Ghostscript 8.5x solved the problem.
Comment 4 Till Kamppeter 2007-07-04 14:54:21 UTC
Checked agaiun and found out that this bug is already fixed in GPL Ghostscript.