| Jose M. Alcaide on Wed, 26 Sep 2001 02:08:42 +0200 (CEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| apsfilter 6.1.1: ps_set_tumble() breaks embedded EPS files |
(1) Some simple questions: Operating System : FreeBSD 4.4-RELEASE apsfilter Rel. : apsfilter-6.1.1 ghostscript Rel. : n/a Printer : any generic PostScript printer serial/parallel : n/a Mono/Color : n/a Postscript-Printer: yes Print Resolution : n/a Your Full Name : Jose M. Alcaide Your e-mail addr : jose@we.lc.ehu.es (2) - Problem description The function ps_set_tumble() uses awk(1) for modifying the PS file, looking for the pattern "^%%EndProlog". Unfortunately, an embedded EPS file may also have that line; as a consequence, the setpagedevice commands will be added to the embedded EPS files. The obvious symptom of this problem is that included EPS figures are not printed. I modified ps_set_tumble to use psset(1) and it works fine now (patch attached). The ps_set_tray() function is also affected by this problem, so I think that it should also be fixed. Cheers, JMA -- ****** Jose M. Alcaide // jose@we.lc.ehu.es // jmas@FreeBSD.org ****** ** "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein **
--- apsfilter.orig Mon May 28 16:21:09 2001
+++ apsfilter Wed Sep 26 01:44:44 2001
@@ -1077,35 +1077,11 @@
ps_set_tumble()
{
- local tumble
-
if [ "$BINDING" = short ]; then
- tumble=true
+ psset -n -q -t
else
- tumble=false
+ psset -n -q -d
fi
-
- # this code was taken from the psset command (a2ps 4.13b)
- awk "{ print } /^%%EndProlog/ { print \"\
-countdictstack\n\
-/psset_mark\n\
-{\n\
-%%BeginFeature: *Duplex true\n\
- (<<) cvx exec /Duplex (true) cvx exec (>>) cvx exec\n\
- systemdict /setpagedevice get exec\n\
-%%EndFeature\n\
-%%BeginFeature: *Tumble $tumble\n\
- (<<) cvx exec /Tumble ($tumble) cvx exec (>>) cvx exec\n\
- systemdict /setpagedevice get exec\n\
-%%EndFeature\n\
-} stopped\n\
-{ /psset_mark eq { exit } if } loop\n\
-countdictstack exch sub dup 0 gt\n\
-{\n\
- { end } repeat\n\
-}{\n\
- pop\n\
-} ifelse\" }"
}
duplex_notification()