EPS file with incorrect BoundingBox
If an included eps image does not show up at the right position the coordinates of the BoundingBox may be incorrect. You could get an impression of if you open the image with an external viewer like gsview (Evince).
epstool provides a quick solution in two steps:
- it generates a TIFF4 preview raster image and calculates the BoundingBox coordinates from it,
- it creates the eps image with the right BoundingBox but without TIFF4 preview.
The temporary eps file including the preview can be deleted afterwards. For options/ parameters of epstool see its manpage (man epstool in the shell) or the epstool homepage.
Here are the command I used:
epstool -b -t4 --output tempfile.eps wrongfile.eps
epstool -p --output corrected.eps tempfile.eps
rm tempfile.eps
If you have many eps files with incorrect BoundingBox you could create a shell script for correction, you even could combine it with the use of the find utility.
To install epstool on Debian Linux or Ubuntu Linux you could use apt-get:
sudo apt-get install epstool
On Ubuntu Linux you also could use Synaptic to install epstool, you will find it in the section Graphics (universe) or by the search button.
Discussed in the LaTeX Community Forum.