[Tex/LaTex] Question about epstopdf command line options

epstopdf

I am running on windows, and I would like to know what command line options are used internally by pdflatex to convert an eps to pdf file? (Note: to run pdflatex, I downloaded MikTex, and used that as the front end.)

Once MikTex had run, it downloaded the "epstopdf" package (?), along with the command line tools. I then chained the two command line utilities eps2eps, and then epstopdf to generate the file.

i.e.,
eps2eps file1.eps file2.eps
epstopdf file2.eps

(I needed to run eps2eps to fix the lack of a bounding box.)

The contents were correct, but the pdf page size was cropped to the figure size.

When pdflatex generates the files, the intermediate file (xx-converted-to.pdf) the pdf page size was a normal page size (8×11 or whatever).

And to make sure this is clear – this is a question about the epstopdf executable, not how to use pdflatex. My hope is that someone here would have the expertise to explain how pdflatex uses the other executables to generate the intermediate pdf.

Thanks.

Best Answer

In my system (TeX Live 2013), the epstopdf package runs the following command:

repstopdf --outfile=xx-converted-to.pdf xx.eps

If you run that command at the command line, with the additional option --debug, you can see what epstopdf is doing with regard to calling ghostscript. Unfortunately, it actually creates a modified version of the original eps, and runs gs on it, and then deletes it (even with --debug!), so I can't say what's in it for sure. But looking through epstopdf.pl I find that it changes the page size to match the Bounding Box:

print $OUT "%%BoundingBox: 0 0 $width $height$/";
print $OUT "<< /PageSize [$width $height] >> setpagedevice$/";    

So I don't see any intermediate pdf with a large page size: all my uses of epstopdf (program or package) produce only one pdf with a size equal to that of the original eps.

The size of the pdf file that is produced needs to be the same size as the eps file: pdflatex needs the size info for correct spacing and placement.