[OS X TeX] converting pdf to eps ... where can I find pdf2eps?

Richard MAHONEY rbm49 at ext.canterbury.ac.nz
Wed Jul 7 05:52:57 EDT 2004


On Wed, Jul 07, 2004 at 10:05:23AM +0100, George Nurser wrote:

> I've been using TeXShop with pdf figures for a paper. The journal now 
> want the figures in eps format for typesetting. They claim rather 
> strangely that they cannot resize pdf figures.
> 
> So ... how do I convert the pdf figures to eps? There is supposed to be 
> a program pdf2eps, but  I don't seem to have it (Panther + Image 
> magick). Anybody know where I can get it from?

you could try using `pdftops'. it is included in the XPDF
distribution. usage:

 [rbm49 at 131.203.240.72] ~/temp $ pdftops -eps input.pdf output.eps


best regards,

 richard mahoney


p.s. you may need to crop the postscript file. the following script
works well:

#!/usr/bin/perl
#
# Cropping a portion of a postscript file
# Postscript magic and instructions provided by Chapman Flack.
# Script implemented by Diego Zamboni
#
# 1.  View the page in gv.  If it's a multipage document, mark the page and
#     hit "save marked" so you have a small file to deal with.
# 2.  Move the mouse pointer to the lower left corner of the area you want.
#     Record the gv displayed coordinates as X1 and Y1.
# 3.  Point to the upper right corner and record X2 and Y2.
# 4.  Run "crop-ps X1 Y1 X2 Y2 file.ps > cropped_file.ps"
#
# This will not work for postscript files that do not have the appropriate
# structuring comments (%%EndSetup, %%Page, etc.)

$usage="Usage: $0 x1 y1 x2 y2 file.ps";

$x1=shift @ARGV;
$y1=shift @ARGV;
$x2=shift @ARGV;
$y2=shift @ARGV;

($x1 && $y2 && $x2 && $y2 ) or
	die "$usage\n";

$w=$x2-$x1;
$h=$y2-$y1;

$flag=0;

while (<>) {
  if (/^%%BoundingBox:/) {
    print "%%BoundingBox: 0 0 $w $h\n";
  }
  elsif (!$flag && (/^%%EndSetup/ || /^%%Page:/)) {
    print;
    print "-$x1 -$y1 translate\n";
    print "$x1 $y1 moveto $x1 $y2 lineto $x2 $y2 lineto ".
          "$x2 $y1 lineto closepath\n";
    print "clip\n";
    $flag=1;
  }
  else {
    print;
  }
}


-- 
Richard MAHONEY | internet: homepages.comnet.net.nz/~r-mahoney
Littledene      | telephone / telefax (man.): ++64 3 312 1699
Bay Road        | cellular: ++64 25 829 986
OXFORD, NZ      | e-mail: r.mahoney[use"@"]comnet.net.nz
-----------------------------------------------------
Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list