Re: Importing Illustrator 8 EPS
- To: mathgroup at smc.vnet.net
- Subject: [mg21983] Re: [mg21966] Importing Illustrator 8 EPS
- From: Bojan Bistrovic <bojanb at physics.odu.edu>
- Date: Mon, 7 Feb 2000 13:02:34 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
> I am unable to import graphics from Adobe Illustrator 8 into Mathematica
> 4.
>
> When attempting to import the graphics I get errors at the bottom of
> this message. I've tried saving the Illustrator documents as versions 7
> and 6 with different combinations of postscript level but with no
> positive result.
>
> Any ideas?
>
> I'm running Windows NT on a 366Mhz PIII, 128MB RAM, IBM Thinkpad 770Z.
>
> Thanks,
> - Chris
>
> In[3]:=
> Trace[
> Import["d:\Users\chuston\Ex5.eps", "EPS"],
> _MessagePacket]
>
> Out[3]=
> {{{{{{{{{{{{{{MessagePacket["postscript",
> "PostScript language error:\nPostScript
> Error: \
> undefined\nOffending Command: ÅÐÓÆ"]},
> MessagePacket["postscript",
> "PostScript language error:\nPostScript
> Error: \
> undefined\nOffending Command: ÅÐÓÆ"]}, {{{MessagePacket["postscript",
> "PostScript language error:\nPostScript
> \
> Error: undefined\nOffending Command: ÅÐÓÆ"]}}}}}}}}}}}}}}}
>
Hi Chris.
PostScript format requires documents to be in 7-bit ASCII text; since letters
"ÅÐÓÆ^^" clearly aren't, what happens is that your Adobe Illustrator saves a
binary "preview" part as well, most likely in TIFF format. There are two ways
to solve the problem; first is to try importing it as "EPSTIFF" format. If
your file is not in tiff-preview format, you'll have to do it the hard way:
open the file in a text-editor; look for the text at the beginning of the file
that starts with characters %! it will look something like "%!PS-Adobe-2.0
EPSF-2.0" or "%!PS-Adobe-3.0 %EPSF-3.0", depending of the version of
PostScript used. There should be about (or less then) 20 binary (8-bit)
characters before it; delete everything before the %! ; those two characters
HAVE TO be the first two characters in the file. The binary part contains
the information about the preview bitmap part. Now, after deleting this, you
have to find the end of the text part of the file which is also the beginning
of the bitmap preview; it's a little harder since it's not as standardized as
the "%!" part at the beginning. Look for something like "%%EOF" or "%%Trailer"
or "end" or "restore" or "rs" or "%%EPS Trailer" or ... ; then delete all the
binary after that. What's left is pure ASCII text that complies to the
PostScript standard so that every program should be able to read it; save it
to a separate file and give it a try.
Bye, Bojan
--
---------------------------------------------------------------------
Bojan Bistrovic, bojanb at physics.odu.edu
Old Dominion University, Norfolk VA & Jefferson Lab, Newport News, VA
---------------------------------------------------------------------