I needed to submit a book to Springer and they wanted figures in .eps format.
I had all my figures embedded in latex so had to find a way of converting all pdf to eps. So here goes the script I found online.
OK, but I had many pdf figures. So this simple command will help to iterate through all pdf images in the folder and pass it to the above script after removing the .pdf extension.
ls | grep pdf | while read x; do pdf2eps 1 ${x%.*}; done
I had all my figures embedded in latex so had to find a way of converting all pdf to eps. So here goes the script I found online.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $ | |
# Convert PDF to encapsulated PostScript. | |
# usage: | |
# pdf2eps <page number> <pdf file without ext> | |
pdfcrop $2.pdf | |
pdftops -f $1 -l $1 -eps "$2-crop.pdf" | |
rm "$2-crop.pdf" | |
mv "$2-crop.eps" $2.eps |
OK, but I had many pdf figures. So this simple command will help to iterate through all pdf images in the folder and pass it to the above script after removing the .pdf extension.
ls | grep pdf | while read x; do pdf2eps 1 ${x%.*}; done
Comments
Post a Comment