3

I have an EPS file that, for whatever reason, looks very small on the screen when I open it with an EPS viewer (gv, in my case... but it looks the same regardless of viewer). I have to immediately zoom in to 8x magnification just to get the image to fill the screen. Of course, since it is a vector graphic, the graphic looks fine when viewed at any magnification.

My question: Is there code I can add to the EPS file to change the default zoom (in other words, to make the file display on screen as 8 times larger by default, regardless of the viewer)?

JCOidl
  • 141

1 Answers1

1

You can scale the the contents of an eps format file by adding the following:

<xscale> <yscale> scale

PostScript command to it before the other commands in the file.

So to make everything 8 times bigger you would use:

8 8 scale

This scales the following graphics with respect to an origin in the lower-right, so it may also be necessary to translate everything so the area where marks appear fall within the visible portion of the "page". Not surprisingly, that can be done with a:

<xoffset> <yoffset> translate

These operations will be applied in the order shown. In other words, it will first scale the output, then translate it. Doing it in the opposite order would give different results, so it's important to remember this when figuring-out what values to use.

It's been a long time since I used ghostview, but I seem to recall there was a way to tell it to prepend files being processed with a preamble of commands, so you wouldn't need to actually modify any of them.

Conforming eps files will contain header comments that contain bounding box information of their content which can be very useful when transforming them. See section 3.1 Displaying an EPS file in the Encapsulated PostScript File Format Specification PDF file.

martineau
  • 4,573