Skip to main content
New Participant
August 26, 2008
Question

data after %%EOF

  • August 26, 2008
  • 5 replies
  • 3854 views
hello,

I have a problem with postscript files (eps) that are generated by illustrator. From a mac, but I don't know that is relevant. This is in the header:

%%AI8_CreatorVersion: 13.0.1
%AI9_PrintingDataBegin
%ADO_BuildNumber: Adobe Illustrator(R) 13.0.1 x421 R agm 4.4379 ct 5.1039

The problem is that ghostscript doesn't accept the files. It seems it has problems with the data that comes after %%EOF (there are sections like %AI9_PrintingDataEnd with data).

I hope this is the right forum to ask the question. My question is: can I omit the data after %%EOF and still get the same result? Can anybody tell me what that data is used for?

thanks in advance, Ruud
This topic has been closed for replies.

5 replies

New Participant
August 26, 2008
Just for the records:

Table 1 DOS EPS Binary File Header
Bytes Description
0-3 Must be hex C5D0D3C6 (byte 0=C5).
4-7 Byte position in file for start of PostScript language code section.
8-11 Byte length of PostScript language section.
12-15 Byte position in file for start of Metafile screen representation.
16-19 Byte length of Metafile section (PSize).
20-23 Byte position of TIFF representation.
24-27 Byte length of TIFF section.

thanks Aandi, Ruud
New Participant
August 26, 2008
that's great!

Aandi, if you can give me a hint where to look for the specification of the header so that I can do that trick, I'd be very grateful

thanks the both of you for your explanation, it was just what I needed.

regards, Ruud
Participating Frequently
August 26, 2008
http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf

This is a big document, but you can ignore 99% of it and focus on the
description of the DOS (or maybe it will say Windows or PC) file
format, which is probably about one page. (It's been over a decade
since I looked, so my memory is hazy).

Aandi Inston
New Participant
August 26, 2008
hi SaGS.

that could be bingo. Indeed a header is stripped of before further processing. It is everything before

%!PS-Adobe-3.1 EPSF-3.0

So you are saying that because of that action gs gets a problem with the rest of the file (after the %EOF). I can try what happens if the header doesn't get stripped off.
But I like to understand also what is happening now. Do I understand well that a AI file contains a postscriptfile, having a preview part in front and having other stuff at the end?

Can I conclude that it is possible to strip both the part before
%!PS-Adobe-3.1 EPSF-3.0
and after
%EOF

and then having a postscript document that contains everything it should?
I'm going to try what's happening when the header is still there....

regards, Ruud
Participating Frequently
August 26, 2008
>. Indeed a header is stripped of before further processing. It is everything before...

That is the problem. You are removing part of the EPS wrapper but not
all of it.

> Do I understand well that a AI file contains a postscriptfile, having a preview part in front and having other stuff at the end?

That isn't specific to AI files. Any EPS file can contain the preview
(which may be before or after the PostScript code).
>
>Can I conclude that it is possible to strip both the part before
>%!PS-Adobe-3.1 EPSF-3.0
>and after
>%EOF

%EOF may not be the last thing in the PostScript code, and might form
part of a placed graphic. This is why you should parse the header and
use the information in it.

Aandi Inston
New Participant
August 26, 2008
Hi Aandi,

the file clearly was corrupt:

Error: /undefined in II*
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1049/1123(ro)(G)-- --dict:1/20(G)-- --dict:88/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 3671548

(as a matter of fact exactly on the last line). My first guess was that everything that came after %%EOF was superfluous, so I deleted it. The result was a graphic that could be the complete graphic.

YOur first question:
after %%EOF I found:

%AI9_PrintingDataEnd
: :
%AI9_PrivateDataBegin
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Adobe Illustrator(R) 13.0
%%AI8_CreatorVersion: 13.0.1
%%Title: (test001-cs3.eps)
%%CreationDate: 8/7/2008 8:14 AM
%AI9_DataStream
%Gb!R&B3-k3[OD.................. more data

Doesn't look disposable to me, but that is exactly what I try to find out.

What do you mean with your last question? What is an AI file? Oh adobe illustrator. Yes. Presumably it is an adobe illustrator file. I got it with eps extension, but that says nothing.
What can I do with this file to make it eps?

regards, Ruud
August 26, 2008
<Ruud_Dozijn@adobeforums.com> wrote in message <br />news:59b645fa.1@webcrossing.la2eafNXanI...<br />> ...<br />> Error: /undefined in II*<br />> ...<br /><br /><br />The "II*" strikes me as being the beginning of a TIFF. Maybe the file is a <br />"DOS EPS", containing a header and a WMF or TIFF preview (TIFF in this <br />case)? Maybe even with the EPS file header already stripped? (I notice that <br />current version of GS recognises DOS EPS files, and extracts and interprets <br />only the PostScript part; but if the header is already removed, it won't <br />correctly detect the file's type.)
Participating Frequently
August 26, 2008
What is the data after %%EOF, and what makes you say that this is the
cause of the problem?

Are you sure this is a complete EPS rather than a (very similar
looking) AI file?

Aandi Inston