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

Bruno Voisin bvoisin at mac.com
Wed Jul 7 11:38:16 CEST 2004


Adding a tiny bit of information to Maarten's post (that I just printed 
and will study later, as I also have to deal with editors who prefer 
EPS to PDF -- actually they even prefer high-quality printouts, that 
they scan before incorporation in their workflow):

The conversion from PDF to EPS has been evoked in a (rather long) 
thread "trim pdf figures" that started on 22 June. The topic was rather 
to correct the bounding box of an incorrect PDF file, but one of the 
proposed solution, a Tcl script, used EPS as an intermediate step. 
Maybe you can extract the part doing the PDF to EPS conversion, based 
on pdf2eps then eps2eps (installed with Ghostscript, in 
/usr/local/bin/), and use it. Possibly this is just equivalent to the 
Ghostscript command line mentioned by Maarten.

Hope this helps,

Bruno Voisin


#!/bin/sh
#\
exec tclsh "$0" "$@"

# croppdf.tcl -- crop a PDF file to give a correct bounding box
# Author: Dr A. J. Carr <alun DOT j DOT carr AT ucd DOT ie>
# Version 0.3 ar3103
# This program is not warranted for suitability of purpose.
# Use at your own risk.

if {$argc == 0} {
     puts "usage: $argv0 file1.pdf [file2.pdf...]"
} else {
     foreach f $argv {
         if {[string compare -nocase [file extension $f] ".pdf"] == 0} {
             set rootname [file rootname $f]
             exec pdf2ps "$f" "${rootname}.ps"
             exec eps2eps "${rootname}.ps" "${rootname}-new.eps"
             file delete "${rootname}.ps"
             exec epstopdf "${rootname}-new.eps"
             file delete "${rootname}-new.eps"
         } else {
             puts stderr "error: not a PDF file: $f"
         }
     }
}

-----------------------------------------------------
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 macostex-archives mailing list