Skip to content

Instantly share code, notes, and snippets.

@varun19299

varun19299/README.md

Created Oct 18, 2020
Embed
What would you like to do?
PDF to EPS via file compression (JPEG)

Converting pdf to eps

First convert to jpg (via convert, which is just imagemagick):

for x in pdf_images/*.pdf
do
filename=$(basename -- "$x")
extension="${filename##*.}"
filename="${filename%.*}"
convert -background white -alpha remove pdf_images/${filename}.pdf jpg_images/${filename}.jpg
done

Then convert to eps via ghostscript:

for x in jpg_images/*.jpg
do
filename=$(basename -- "$x")
extension="${filename##*.}"
filename="${filename%.*}"
convert jpg_images/${filename}.jpg eps3:eps_images/${filename}.eps
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.