Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

data after %%EOF

New Here ,
Aug 26, 2008 Aug 26, 2008
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
TOPICS
Programming
4.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 26, 2008 Aug 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.)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2008 Aug 26, 2008
>the file clearly was corrupt:

Well, the file clearly wasn't working as you wanted, but corrupt? I
don't think so.
>
>Error: /undefined in II*

Ah, this is characteristic. What you have is an EPS with TIFF preview.
This is a normal and valid EPS, but contains extra information that
must be removed to treat it as regular PostScript.

I understand GhostView will remove the preview, but this is not the
job of GhostScript.
>
>YOur first question:
>after %%EOF I found:
>
>%AI9_PrintingDataEnd

It looks to be as if this %%EOF wasn't the actual end of PostScript
(which might not have a %%EOF) but was the end of an embedded graphic
(EPS in EPS).

You really need to parse the EPS structure to know where to start
cutting.

>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.

Well, it might be an AI file or it might be a full EPS. An AI file may
be (but need not be) a cut down EPS, leaving out much that is repeated
every time, but which is vital for a PostScript interpreter.

So far the error suggests EPS rather than AI.


Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2008 Aug 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2008 Aug 26, 2008
LATEST
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines