Debian Bug report logs - #30368
magicfilter: Comments in PS Files confuse printer

version graph

Package: magicfilter; Maintainer for magicfilter is Debian Printing Team <debian-printing@lists.debian.org>; Source for magicfilter is src:magicfilter (PTS, buildd, popcon).

Reported by: <alexander.schwartz@gmx.net>

Date: Fri, 4 Dec 1998 22:18:15 UTC

Severity: normal

Found in version 1.2-27

Done: David Frey <david@eos.lugs.ch>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, David Frey <dfrey@debian.org>:
Bug#30368; Package magicfilter. (full text, mbox, link).


Acknowledgement sent to <alexander.schwartz@gmx.net>:
New bug report received and forwarded. Copy sent to David Frey <dfrey@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: <alexander.schwartz@gmx.net>
To: submit@bugs.debian.org
Subject: magicfilter: Comments in PS Files confuse printer
Date: Fri, 4 Dec 1998 22:14:06 GMT
Package: magicfilter
Version: 1.2-27

I recently installed the Adobe standard Postscript driver for Windows95
on my second PC and the trouble is that Adobe adds comments to the 
Postscript file that are then printed to stdout by gs. They are not
suppressed by the -q option. Example:

gs -q test.ps
%%[ ProductName: Aladdin Ghostscript ]%%
....
%%[ Page: 1 ]%%
%%[ LastPage ]%%

I modified the configuration files below so this output to stdout is discarded.
I wonder if you want to include it in the next patch. May be there is a
different way to do it? The PS-Code looks like:

statusdict begin (%%[ ProductName: ) print product print ( ]%%)= flush end

Tell me if you want a complete example.

Alexander Schwartz

-- System Information
Debian Release: slink
Kernel Version: Linux stue0ef 2.0.35 #1 Sun Nov 29 10:39:53 GMT 1998 i686 unknown

Versions of the packages magicfilter depends on:
ii  libc6           2.0.7u-6       The GNU C library version 2 (run-time files)

--- Begin /etc/magicfilter/deskjet-filter (modified conffile)
#! /usr/sbin/magicfilter
#
#
#
0	%!		filter	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile="| cat 1>&2" - 2>&1 > /dev/null
0	\004%!		filter	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile="| cat 1>&2" - 2>&1 > /dev/null 
0	%PDF		fpipe 	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=deskjet -sOutputFile=- $FILE 
0	\367\002	fpipe	/usr/bin/dvips  -D 300  -R -q -f 
0	\037\235	pipe	/bin/gzip  -cdq 
0	\037\036	pipe	/bin/gzip  -cdq 
0	\037\213	pipe	/bin/gzip  -cdq 
0	\037\236	pipe	/bin/gzip  -cdq 
0	\037\240	pipe	/bin/gzip  -cdq 
0	.\?\?\040	fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	.\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	'\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	'.\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	"x T ps"	pipe 	/usr/bin/grops 
0	"x T dvi"	pipe	/usr/bin/grodvi 
0	"x T ascii"	pipe	/usr/bin/grotty 
0	"x T latin1"	pipe	/usr/bin/grotty 
0	"x T lj4"	reject	Cannot print LaserJet 4 ditroff files.
0	P1\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P2\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P3\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P4\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P5\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P6\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	\033E\033	cat 
0	\033%-12345X	reject	Cannot print PJL files on this printer. 
0	"@PJL "		reject	Cannot print PJL files on this printer. 
0	@PJL\t		reject	Cannot print PJL files on this printer. 
0	@PJL\r		reject	Cannot print PJL files on this printer. 
0	@PJL\n		reject	Cannot print PJL files on this printer. 
0	GIF87a		pipe	/usr/bin/giftopnm  2>/dev/null
0	GIF89a		pipe	/usr/bin/giftopnm  2>/dev/null
0	\377\330\377\340\?\?JFIF\0	pipe	/usr/bin/djpeg  -pnm
0	MM\0\x2a	fpipe   /usr/bin/tiff2ps  $FILE
0	II\x2a\0	fpipe   /usr/bin/tiff2ps  $FILE 
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x40	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x28	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0       \000\000\000\000\000   cat
0	\x59\xa6\x6a\x95 pipe	/usr/bin/rasttopnm  2>/dev/null
0	\x1\xda		pipe	/usr/bin/sgitopnm  2>/dev/null
0	\xda\x1		pipe	/usr/bin/sgitopnm  2>/dev/null
0	#FIG		pipe	/usr/bin/X11/fig2dev  -Lps -P -l dummy
#
#
257	ustar\0		reject	Attempted to print a tar file.
257	"ustar  \0"	reject	Attempted to print a tar file.
0	07070		reject	Attempted to print a cpio file.
0	PK\3\4		reject	Attempted to print a zip file.
20	\xdc\xa7\xc7\xfd reject	Attempted to print a zoo file.
0	\013\1d\0	reject	Attempted to print a compiled binary.
0	\100\1d\0	reject	Attempted to print a compiled binary.
0	\007\1d\0	reject	Attempted to print a compiled binary.
0	\314\0d\0	reject	Attempted to print a compiled binary.
0	\177ELF		reject	Attempted to print an ELF object.
0	\007\001\0	reject	Attempted to print an object file.
216	\021\001\0\0	reject	Attempted to print a core dump file.
0	!<arch>		reject	Attempted to print an archive.
0	=<ar>		reject	Attempted to print an archive.
0	.snd		reject	Attempted to print Sun/NeXT audio data.
0	'''		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	\033		cat 
default			cat	\eE\e&k2G\e(0N	\eE 

--- End /etc/magicfilter/deskjet-filter

--- Begin /etc/magicfilter/dj500-filter (modified conffile)
#! /usr/sbin/magicfilter
#
#
#
0	%!		filter	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile="| cat 1>&2" - 2>&1 > /dev/null 
0	\004%!		filter	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile=- - 
0	%PDF		fpipe 	/usr/bin/gs  -q -dSAFER -dNOPAUSE -r300 -sDEVICE=djet500 -sOutputFile=- $FILE 
0	\367\002	fpipe	/usr/bin/dvips  -D 300  -R -q -f 
0	\037\235	pipe	/bin/gzip  -cdq 
0	\037\036	pipe	/bin/gzip  -cdq 
0	\037\213	pipe	/bin/gzip  -cdq 
0	\037\236	pipe	/bin/gzip  -cdq 
0	\037\240	pipe	/bin/gzip  -cdq 
0	.\?\?\040	fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	.\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	'\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	'.\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	\\\"		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	"x T ps"	pipe 	/usr/bin/grops 
0	"x T dvi"	pipe	/usr/bin/grodvi 
0	"x T ascii"	pipe	/usr/bin/grotty 
0	"x T latin1"	pipe	/usr/bin/grotty 
0	"x T lj4"	reject	Cannot print LaserJet 4 ditroff files.
0	P1\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P2\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P3\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P4\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P5\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	P6\n		pipe 	/usr/bin/pnmtops  -scale 1000 -dpi 300  2>/dev/null 
0	\033E\033	cat 
0	\033%-12345X	reject	Cannot print PJL files on this printer. 
0	"@PJL "		reject	Cannot print PJL files on this printer. 
0	@PJL\t		reject	Cannot print PJL files on this printer. 
0	@PJL\r		reject	Cannot print PJL files on this printer. 
0	@PJL\n		reject	Cannot print PJL files on this printer. 
0	GIF87a		pipe	/usr/bin/giftopnm  2>/dev/null
0	GIF89a		pipe	/usr/bin/giftopnm  2>/dev/null
0	\377\330\377\340\?\?JFIF\0	pipe	/usr/bin/djpeg  -pnm
0	MM\0\x2a	fpipe   /usr/bin/tiff2ps  $FILE
0	II\x2a\0	fpipe   /usr/bin/tiff2ps  $FILE 
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x40	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0	BM\?\?\?\?\?\?\?\?\?\?\?\?\x28	pipe	\
	/usr/bin/bmptoppm  2>/dev/null
0       \000\000\000\000\000   cat
0	\x59\xa6\x6a\x95 pipe	/usr/bin/rasttopnm  2>/dev/null
0	\x1\xda		pipe	/usr/bin/sgitopnm  2>/dev/null
0	\xda\x1		pipe	/usr/bin/sgitopnm  2>/dev/null
0	#FIG		pipe	/usr/bin/X11/fig2dev  -Lps -P -l dummy
#
#
257	ustar\0		reject	Attempted to print a tar file.
257	"ustar  \0"	reject	Attempted to print a tar file.
0	07070		reject	Attempted to print a cpio file.
0	PK\3\4		reject	Attempted to print a zip file.
20	\xdc\xa7\xc7\xfd reject	Attempted to print a zoo file.
0	\013\1d\0	reject	Attempted to print a compiled binary.
0	\100\1d\0	reject	Attempted to print a compiled binary.
0	\007\1d\0	reject	Attempted to print a compiled binary.
0	\314\0d\0	reject	Attempted to print a compiled binary.
0	\177ELF		reject	Attempted to print an ELF object.
0	\007\001\0	reject	Attempted to print an object file.
216	\021\001\0\0	reject	Attempted to print a core dump file.
0	!<arch>		reject	Attempted to print an archive.
0	=<ar>		reject	Attempted to print an archive.
0	.snd		reject	Attempted to print Sun/NeXT audio data.
0	'''		fpipe 	`/usr/bin/grog  -Tps $FILE` 
0	\033		cat 
#
default			filter 	/usr/bin/djscript -q 

--- End /etc/magicfilter/dj500-filter


Reply sent to David Frey <david@eos.lugs.ch>:
You have taken responsibility. (full text, mbox, link).


Notification sent to <alexander.schwartz@gmx.net>:
Bug acknowledged by developer. (full text, mbox, link).


Message #10 received at 30368-done@bugs.debian.org (full text, mbox, reply):

From: David Frey <david@eos.lugs.ch>
To: 30368-done@bugs.debian.org
Subject: Re: Bug#30368: magicfilter: Comments in PS Files confuse printer
Date: Mon, 1 May 2000 23:07:58 +0200
On Fri, Dec 04, 1998 at 10:14:06PM +0000, alexander.schwartz@gmx.net wrote:
> statusdict begin (%%[ ProductName: ) print product print ( ]%%)= flush end

In the meantime I've read Adobe's PostScript reference manual.
The "print" operators causes the PS engine to print the message to the
"Standard output port" which is correctly stdout with gs. But stdout is
printed to the printer, since it is the name of the output file. So your
statement gets printed.

I had your solution once in the distribution, but it caused more problems
than it solved (complaints about hanging print jobs).

I close this bug on the reasoning that the PS code is faulty.

David


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 28 14:11:00 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.