Skip to main content
June 15, 2017
Answered

Is it possible to easily store in an EPS file the page area?

  • June 15, 2017
  • 3 replies
  • 1406 views

I'm a programmer, not a graphics designer, so treat me kindly!

I have a program which creates a ton of EPS files automatically. They are fine except that when opened in Illustrator they are placed in the middle of an A4 page. They are actually 18.5mm x 18.5mm square, as specified inside the EPS file bounding boxes and as they appear on the A4 page.

My customer wants them to appear in an 18.5 x 18.5 area, not the default A4 page.

Is there any way I can set this inside the EPS file?

Or is there some other technique I can use to get these images into the correct area automatically? We tried to do a batcher which cropped, but the crop action did not seem to get recorded.

We've tried reading in the original EPS (created by my program), cropping it manually, and saving it using Illustrator to see how Illustrator saves the page size (work area size?). It DOES do it somehow but the file goes from less than 1K to more than 850K in size and is full of PS functions and data.

My original EPS is this:

%!PS-Adobe-3.0

%%BoundingBox: 0 0 53 53

%%HiResBoundingBox: 0.0 0.0 52.5 52.5

0.000000 0.000000 0.000000 1.000000 setcmykcolor

0.000000 0.000000 moveto 52.500000 52.500000 lineto stroke

1.0 1.0 moveto 51.5 1.0 lineto stroke

51.5 1.0 moveto 51.5 51.5 lineto stroke

51.5 51.5 moveto 1.0 51.5 lineto stroke

1.0 51.5 moveto 1.0 1.0 lineto stroke

/Calibri-Light findfont 4.5 scalefont setfont

4 5 moveto (HR Testo in basso) show 

4 40 moveto (HR Testo in alto) show 

showpage

%%EndDocument

As far as the graphics works it is fine, it's just the page area which I don't know how to specify...

This topic has been closed for replies.
Correct answer Monika Gause

Your EPS has a bounding box, but not the media size. EPS files cannot contain a media size (you're not alone with this issue).

When you save an EPS out of Illustrator, what you will get is an EPS that contains a full AI file inside. Whenever you open the EPS in Illustrator again, it doesn't use the EPS code, but the AI code.

The only way to get the media size into your file would be to save a different file format. Like PDF

converter - Ghostscript: How to convert EPS to PDF with the same page size - Stack Overflow

3 replies

Doug A Roberts
Community Expert
Community Expert
June 16, 2017

i know, but since you're opening a file that doesn't have an artboard, i thought it might have the same effect.

Doug A Roberts
Community Expert
Community Expert
June 16, 2017

it does with a Photoshop EPS, if that helps.

June 16, 2017

"it does with a Photoshop EPS, if that helps."

That is the problem, Monika says that the .EPS saved from Illustrator is really a .AI, hence the 1K vs 800K size difference, and the huge complexity of the file saved.

Monika Gause
Community Expert
Monika GauseCommunity ExpertCorrect answer
Community Expert
June 15, 2017

Your EPS has a bounding box, but not the media size. EPS files cannot contain a media size (you're not alone with this issue).

When you save an EPS out of Illustrator, what you will get is an EPS that contains a full AI file inside. Whenever you open the EPS in Illustrator again, it doesn't use the EPS code, but the AI code.

The only way to get the media size into your file would be to save a different file format. Like PDF

converter - Ghostscript: How to convert EPS to PDF with the same page size - Stack Overflow

Doug A Roberts
Community Expert
Community Expert
June 15, 2017

when you open a raster file directly into AI, it opens with an artboard the same size as the last document profile used. so perhaps if you create a document profile in AI that is 18.5 x 18.5, open that, then open your EPS files, that'd have the same effect.

June 15, 2017

EPS is not raster ...