Re: illustratorCS2で作ったepsファイルを含んだtexファイルを、psまたはpdfに変換するときのトラブルについて

名前: 角藤
日時: 2006-01-20 15:08:53
IPアドレス: 157.13.51.*

>>40596 >dvipsk: ! expected to see %%EndBinary at end of data > >このようなメッセージが出て、変換できません。 >参考になるかわかりませんが、illustratorで、半透明の機能を用いると >そのようなエラーが表示されることが経験的にわかっています。 >手がかりでもよろしいので、解決手段をご教授ください。 > >#現在は、CS2で作成したepsファイルを10で作り直しています ----- より下部を fixill2.pl としてセーブし、 perl fixill2.pl <old.eps >new.eps として new.eps を作成し、 new.eps を使ってみて下さい。 ( Rokicki さんが別の問題で作成されたものを、 %%BeginBinary に 応用したものです。) こちらではこれで dvipsk: ! expected to see %%EndBinary at end of data が出なくなりました (一つやってみただけですが...) ----- #!/usr/local/bin/perl -w # # Fix %%BeginBinary comment in Illustrator files from Illustrator CS2 # # Usage: # # perl fixill2.pl <oldfile.eps >newfile.eps # binmode STDIN ; binmode STDOUT ; my $remainder = "" ; sub getline { my $r = $remainder ; $remainder = "" ; while (defined($c=getc())) { $r .= $c ; if ($c eq "\r") { # gotta look ahead here if (defined($c = getc())) { if ($c eq "\n") { $r .= $c ; } else { $remainder = $c ; } } return $r ; } elsif ($c eq "\n") { return $r ; } } return $r ; } @a = () ; while (($ln = getline()) ne "") { push @a, $ln ; } for ($i=0; $i<@a; $i++) { if (($bc, undef, undef, $what) = ($a[$i] =~ /^%%BeginBinary:\s+(\S+)(\s+(\S+)\s+(\S+))?/)) { if (!defined($what) || lc $what eq "bytes") { my $beg = $i ; my $rbc = 0 ; $i++ ; while ($i < @a && $a[$i] !~ /^%%EndBinary/) { $rbc += length($a[$i++]) ; } if ($bc != $rbc) { $a[$beg] =~ s/$bc/$rbc/ ; print STDERR "Byte count updated from $bc to $rbc\n" ; } } } } for (@a) { print ; }

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)