This is a follow-up of the question https://tex.stackexchange.com/questions/14402/eps-file-with-tight-bb-psfrag-labels.

I have this file named model.eps (see further below on how to get the file) and I am replacing the labels on the figure using psfrag commands. If I compile the file test3.tex using latex > dvips > ps2pdf, the resulting file is well-cropped and is the same as the size of the file model.eps. I am using the standalone package.

However I would like an EPS file instead of a PDF file. With dvips I can get a PS file. I tried the command:

dvips -D7200 -E test3.dvi -o test3.ps

making sure to use the -E switch in order to get a tight bounding box.

The resulting PS file (test3.ps) is not properly tight bounded on the left as you can see.

What am I doing wrong and how can I correct this fault?

All the files are in the folder tightbounding here at http://petitlien.fr/my_test_file.

Thank you for any suggestions...

---- Update

Running epstool:

E:\new>epstool --bbox --copy test3.ps outfile.eps

DSC Information

At line 9033:

Lines in DSC documents must be shorter than 255 characters.

"C:\Program Files\gs\gs9.01\bin\gswin32c.exe"  -dNOPAUSE -dBATCH -sDEVICE=bbox
 -c "<</PageSize [9400 9400] /PageOffset [3000 3000]>> setpagedevice" -f "c:\doc
GPL Ghostscript 9.01 (2011-02-07)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%BoundingBox: 0 0 0 0
%%HiResBoundingBox: 0.000000 0.000000 0.000000 0.000000

I'm getting the bounding box as 0 0 0 0. Why?


install the program epstool, available for Windows and Linux and then run

epstool --bbox --copy infile.eps outfile.eps

then outfile.eps should have a correct bounding box.

| improve this answer | |
  • Thanks. I am having problems to run epstool on Windows but I shall play with it and make it work. Epstool is putting the bounding box as 0 0 0 0 and it terminates normally. It can locate my Ghostscript. There must be something else which I need to do. – yCalleecharan Mar 29 '11 at 14:26
  • I've posted the output I get using epstool above in my post. 1 vote up in the meantime. – yCalleecharan Mar 29 '11 at 14:32

The dvips manual states that it will not look at included graphics when calculating the bounding box. Perhaps you could add a white framed box around the figure?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.