[texhax] includegraphics clipping failing, help?

Steve Schwartz s.schwartz at imperial.ac.uk
Fri Jul 18 11:00:09 CEST 2008


Mike

On Thu, 2008-07-17 at 23:35 -0400, Mike Kordosky wrote:
> I've tried various incantations of ps2epsi and so on, but no luck.  
> 
> I'm using the following programs. Any advice appreciated:
> 
> pdfTeX using libpoppler 3.141592-1.40.3-2.2 (Web2C 7.5.6) 

It sounds to me like your original eps file has something strange about
it. I'd be inclined to try to run it through a filter/translator (or
several) to see if you can clean it up and get it to behave. And since
you're using pdfTeX I'd be inclined to convert it to a pdf image and use
pdflatex to generate pdf directly.

Try:

epstopdf file.eps     [this should generate a good pdf]
pdfcrop file.pdf      [this will crop it to the bounding box;
                       you can also add --margins options to
                       increase or decrease the clipping]

In my experience the above work very well, better than I can do with
lower level tools, which I always find surprising since they sit on top
of gs and latex; I can only assume that the authors are much better than
I am in getting gs and latex to work in subtle ways.

If you really need an eps at the end, you could run the result through

pdftops 

And you might try running your original through eps2eps, which does a
pretty good job at cleaning and clipping an eps (not as good as
epstopdf). Other options include using various postscript printer
drivers (and you may need to try several as they aren't the same) to
print your file to a new file and work with that.

When all the above fail, load your eps into Adobe Illustrator or some
other ps editor. If it loads, you have a chance to save it as something
clean. If really desperate, scan or convert your image to a fairly
high-resolution bitmap and crop that. Depending on what is in your
image, you might be able to use one of the bitmap tracing programs
(e.g., autotrace) to convert it back to an eps.

As a final offering, while you're beating your head against the wall,
turn through 180 degrees regularly to keep the left and right sides of
your brain equally concussed.

Steve

-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list