Skip to content

Instantly share code, notes, and snippets.

@trangdata
Last active February 2, 2021 16:31
Show Gist options
  • Select an option

  • Save trangdata/ebe2cea0a08359a383588d2c8e88f877 to your computer and use it in GitHub Desktop.

Select an option

Save trangdata/ebe2cea0a08359a383588d2c8e88f877 to your computer and use it in GitHub Desktop.
Convert pdf to eps
#!/bin/bash
# put script at the same level with the directory that contains pdfs (e.g. my_pdfs)
# make my_pdfs the working directory
# To run this script, first, make it executable: chmod +x convert.sh
# Then run it: ./convert.sh
mkdir outputEPS
cp *.pdf outputEPS/
cd outputEPS
# convert all pdf to ps
for filename in *.pdf; do
#echo "$filename"
pdf2ps "$filename"
done
# convert all ps to eps
for filename in *.ps; do
ps2eps "$filename"
done
# clean up
rm *.pdf
rm *.ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment