I created a small Script in AutoIt, which adds Metadata to Images downloaded from shutterstock.com
Everything works fine for jpg images, except for the eps Files.
Here's an Example:
exiftool -Subject="New Year's Card Whit Rabbit" shutterstock_60989023.eps
1 image File updated
Everything works fine, and in Adobe Bridge i get the Metadata displayed.
But if I try to open in in Illustrator, i get the Error:
Offending Operator: "where"
Pc
PB
%AI5_EndPalette
%%EndSetup
%begin_xml_code
/pdfmark where
Eps Files which I created myself in ILustrator cs5, are not affected.
I cannot tell if only shutterstock eps files are affected, or what is actually causing the Problem.
To reproduce the error, you can download a free eps image from shutterstock after free registration.
I tried a few different options, but all with the same result.
thank you
Exiftool 8.37 on Windows 64bit
Adobe Illustrator Cs5
Would it be possible to attach a sample "before" eps image here?
Thanks.
- Phil
It could have something to do with the Filesize, as I wanted to send you one with ~400kb, but after a quick test this File was ok.
Now the Testfile has a Filesize of 1200kb, and after a test, it is corrupted after writing Metadata to it.
thanks
Ok, I can replicate the Error when saving whatever File in Illustrator as "Illustrator 8",
which is an old standard, but as for compability Shutterstock may uses this Version.
When I open testfile.eps , and save it again in Illustrator 9 +,
the Metadata gets written properly and doesn't affect the eps file.
thank you
I have downloaded the file. You can remove it from your server now.
I will take a look at it and post back here.
- Phil
I am downloading the AI CS5 trial so I can run some tests myself. This could be a tricky problem. It is possible that AI simply doesn't support XMP in their version 8 EPS files. I am following the technique described in the XMP specification to add XMP to EPS, but the specification also states:
"It also specifically discusses issues involving Acrobat® Distiller®, since workflows often use Distiller to produce PDF from PostScript and EPS.
NOTE This does not imply that use of Distiller is necessary, or that other application issues do not exist."
... which isn't exactly what one wants to hear.
I have Bridge CS4 and it won't add XMP to any EPS files. Do you have anything that will do this to see if it produces something that AI likes? (Bridge CS5 perhaps?)
- Phil
I only have Adobe Cs5 here.
In Bridge Cs5 I am not able to add any Metatags to eps Files which are Created with "Illustrator 8".
Same File saved again as 9+, I am able to add Metadata.
I was happy to see that I can add Metadata through Exiftool.
I tried opening those Files in Corel Draw, to see if it`s only an Adobe Problem,
or if it is a Problem that I8 eps Files beeing not compatible to have Metadate,
but unfortunatly I am not able to open any eps Files with my Corel Draw X3.
Maybe it's just my installation here, but the Program becomes unresponsive as soon as I try to load any eps file.
But at least, Adobe Cs5 displays Metadata and Preview Image of every eps File just Fine.
Only Illustrator has a Problem loading those Files.
If you know any other Software which can load and edit eps Files,
I am happy to do a few tests.
thank you
I have definitely managed to reproduce the problem with respect to getting AI to barf on the edited images. However, the file still displays properly in Photoshop (CS4) and Apple Preview. Photoshop even picks up the edited metadata without a problem.
So it seems that there is something specific about the EPS format expected by Illustrator. I will do some more work to try to figure out what this is.
- Phil
It's looking like I may have to just disable writing to older AI EPS files. :( I'm still working on this, but this is my current thinking.
- Phil
Ok, I am already trying to write a Batch File to convert all of the eps Files from Shutterstock to Illustrator 12 Files.
Although, I have already written around 50 eps Files with the Option -overwrite_original .
Any Idea how I might get those 50 Files back to work in Illustrator?
I tried -xmp:all= and so on, but the Error Message keeps coming.
thank you
Do you have Perl installed? I can easily write a script that should be able to fix your 50 files. Basically you want to remove everything between "%begin_xml_code" and "%end_xml_code" in the files. You could even do this with any good plain-text word processor, but doing 50 files would be a lot of work.
- Phil
no, not yet.
But I will go and install it.
So with exiftool.exe this probably ain't possible, right?
Right. ExifTool leaves an empty XMP record in the file even if you delete all XMP tags.
- Phil
Ok.
Do you already have such a perl script, or would you have to code one?
I am not good at programming, I just know that it's a lot of work.
thanks
It's not a lot of work. I can have something ready in a couple of hours.
- Phil
Attached is a simple script to remove the XMP totally from an EPS file. You run it like this:
perl remove_xmp FILE
Where file is the name of one or more EPS files. (ie. perl remove_xmp *.eps to do all of them)
The script will generate a bunch of "_orig" files which are the backups of the files before this script was run.
I tested the script and it does what I wanted, but I can't verify that Illustrator will read the resulting file until I get home later today. However, from the tests I ran yesterday I'm pretty confident that this should work.
- Phil
Hi Phil,
thank you very much.
The script works fine on a single File, but doesn't work on more Files.
perl remove_xmp *.eps gives back error message "Error opening *.eps"
I am on Windows using the latest strawberry perl.
You're right. Sorry. I forgot that Windows doesn't expand wildcards on the command line like other shells.
I've added the necessary code to do this manually. Attached is a new version (which should work provided you have the File::Glob library installed).
- Phil
Awesome,
This works great.
But if I run the script through the whole library, my Files which have been created by corelDraw are going to be broken in Illustrator.
Now I added a few lines to the script, as only AI8 Files are affected by the xmp metadata:
EDIT: New remove_xmp is Attached
Thanks again Phil,
Mario
EDIT: I changed the code again, as the first Code rewrite deleted the Creator Tag.
Right.
The syntax is:
$buff =~ s/original string/replacement string/ to do a substitution.
or
$buff =~ /search string/ to test to see if a string exists
It seems you wanted to do the latter. Doing it this way would have prevented loading the file again, but what you have done looks like it would get the job done.
- Phil
Update:
I wasn't able to figure out how to fix the problem so that Illustrator would read one of these older EPS files after adding XMP with ExifTool.
As a result, ExifTool 8.38 (just released) disables writing of XMP to these older Illustrator EPS files.
Thanks for reporting this problem.
- Phil