Converting PDF to EPS: Difference between revisions
From charlesreid1
(Created page with "=The Problem= EPS files are common and easy to use in LaTeX documents, but they're only easy to produce if you have direct control over the production process, which is often no...") |
No edit summary |
||
| Line 34: | Line 34: | ||
Usage: pdf2eps *.pdf | Usage: pdf2eps *.pdf | ||
=References= | |||
* http://email.esm.psu.edu/pipermail/macosx-tex/2004-July/006767.html | |||
Revision as of 15:16, 8 August 2011
The Problem
EPS files are common and easy to use in LaTeX documents, but they're only easy to produce if you have direct control over the production process, which is often not the case.
PDF files are common and easy to generate, and sometimes someone gives you a PDF file and you need to incorporate it somehow. But they aren't easy to convert to EPS.
The Solution
The solution is, use Ghostscript:
gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=your-output-file.eps your-source-file.pdf
or, you can put it in a script and name it pdf2eps and put it on your path:
<source lang="bash">
- !/bin/bash
while test $# -gt 0 ; do
case $1 in
*.pdf) /usr/local/bin/gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=${1%.pdf}.eps $1 ;; *) echo "File $1 not recognised, skipping" ;; esac
shift
done
- end of script.
</bash>
Usage: pdf2eps *.pdf