Last active
February 2, 2021 16:31
-
-
Save trangdata/ebe2cea0a08359a383588d2c8e88f877 to your computer and use it in GitHub Desktop.
Convert pdf to eps
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/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