Article View: fj.lang.postscript
Article #986Re: dvi2ps-1.7j + kdraw + Preview => OffendingCommand: restore
From: Kazuhiro Kazama
Date: Sat, 04 Apr 1992 14:25
Date: Sat, 04 Apr 1992 14:25
81 lines
3057 bytes
3057 bytes
$@Iw4V!w#N#T#T%=%U%H8&$G$9!#(J
In article <YOUKI.92Apr4034932@nozomi.rd.ecip.osaka-u.ac.jp> youki@rd.ecip.osaka-u.ac.jp (Youki Kadobayashi) writes:
> $@$H$$$&%(%i!<$K$J$C$F!"$=$l0J9_$N%Z!<%8$r%W%l%S%e!<$G$-(J$@$J$$(J (NeXT
> Printer $@$K$O=PNO$G$-$k(J) $@$N$G$9$,!"(Jkdraw $@$N=PNO$r(J DSC $@$K9g$&$h$&$K=$@5(J
> $@$9$kJ}K!$O$J$$(J$@$b$N$G$7$g$&$+!#=$@5J}K!$5$($o$+$l$P(J perl $@$G%9%/%j%W%H$r(J
> $@=q$$$FBP=h$G$-$k$H;W$&$N$G$9$,!#(J
$@!!$H$j$"(J$@$($:!"(Jpsfix$@$H$$$&(Jperl script$@$,(Jepsf.sty$@$K4^$^$l$F$$$k$H;W$&$N$G!"(J
$@$=$l$r;n$7$F$/$@$5$$!#B?J,!"(J"%%BeginDocument:"$@!"(J"%%EndDocument"$@$G0O$s(J
$@$G$b$&$^$/=hM}$G$-$J$$$H;W$&$s$@$1$I!D!#;d$O(Jperl$@$O>\$7$/$J$$$N$G!"$b(J$@$7(J
$@$&$^$/F0:n$7$J$+$C$?$iE,Ev$K=$@5$7$F$/$@$5$$!#0l1~:G8e$K$D$1$F$*$-$^$9!#(J
$@!!<B$O$3$N(Jpsfix$@$H$$$&L>A0(J$@$O!"(JMathematica$@$K4^$^$l$k%W%m%0%i%`$NL>A0$G$h(J
$@$/$J$$$s$@$1$I!"LdBj$"$l$P%W%m%0%i%`L>$bJQ$($F$/$@$5$$!#(J
> (5) $@$r(J ghostview $@$KCV$-49$($k$H(J kdraw $@$GIA$$$??^$NF~$C$?%Z!<%8$O$A$c$s(J
> $@$H%W%l%S%e!<$G$-$^$9$,(J$@!":#EY$O(J Improv $@$N=PNO$,F~$C$F$$$k%Z!<%8$G%(%i!<(J
> $@$K$J$k$s$G$9$h$M!#(J
$@!!$3$A$i$O(Jghostscript$@<+BN$NLd(J$@Bj$G$9$+!)(J
#!/usr/bin/perl
# Copyright (C) 1990 Kazuhiro Kazama
$tmp="psfix$$";
if (@ARGV eq '') {
do usage();
}
while ($_ = shift(@ARGV)) {
push(psfiles, ($_));
}
foreach $file (@psfiles) {
unless (open(stdin, $file)) {
print("Can't open $file\n");
exit;
}
unless (open(stdout, "> $tmp")) {
print("Can't create file\n");
exit;
}
$_ = <>;
if (/^%!/) {
print "%!PS-Adobe-2.0 EPSF-1.2\n";
do print_comment();
do print_body();
} else {
die("This file is not a postscript file.");
}
rename($file, $file . '.bak');
rename($tmp, $file);
}
sub print_comment {
while (<>) {
next if (/^%%BoundingBox: \? \? \? \?/);
next if (/^%%Page/);
print;
last if (/^%%EndComments/);
}
}
sub print_body {
while (<>) {
next if (/^%%Page/);
next if (/^%%Trailer/);
next if (/^%%EOF/);
print;
}
}
sub usage {
print stderr "Usage: psfix f1 ... fn\n";
exit;
}
--
$@Iw4V0lMN(J (kazama@square.ntt.jp)
NTT$@%=%U%H%&%'%"8&5f=j(J $@%=%U%H%&%'%"4pAC5;=Q8&5fIt(J
$@J,;67?%=%U%H%&%'%"8&5f%0%k!<%W(J
Technical Details
Message-ID:
<282436@nttlab.ntt.JP>Path:
arc1-ca.pugleaf.net!sparky!uunet!ccut!s.u-tokyo!riksun!rknss1!rkna50!nttlab!kazamaReferences:
<YOUKI.92Apr4034932@nozomi.rd.ecip.osaka-u.ac.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: fa2ca,d56cbcf26f67c1c X-Google-Attributes: gidfa2ca,public X-Google-ArrivalTime: 1992-04-04 06:25:05 PST Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!s.u-tokyo!riksun!rknss1!rkna50!nttlab!kazama From: kazama@square.ntt.jp (Kazuhiro Kazama) Newsgroups: fj.lang.postscript Subject: Re: dvi2ps-1.7j + kdraw + Preview => OffendingCommand: restore Message-ID: <282436@nttlab.ntt.JP> Date: 4 Apr 92 14:25:05 GMT References: <YOUKI.92Apr4034932@nozomi.rd.ecip.osaka-u.ac.jp> Sender: news@nttlab.ntt.JP Distribution: fj Organization: NTT Software Laboratories, Tokyo, Japan. Lines: 81 In-reply-to: youki@rd.ecip.osaka-u.ac.jp's message of 4 Apr 1992 03:49:32 JST