Skip to content

Instantly share code, notes, and snippets.

@kmundnic
Created August 7, 2017 16:31
Show Gist options
  • Save kmundnic/df8976a4706c484fae830e333025df6d to your computer and use it in GitHub Desktop.
Save kmundnic/df8976a4706c484fae830e333025df6d to your computer and use it in GitHub Desktop.
PDF to EPS conversion
#!/bin/bash
# Convert PDF to encapsulated PostScript
# usage: pdf2eps <filename.pdf>
# Obtained from: https://tex.stackexchange.com/a/242265/62493
# Remove .pdf extension from input
filename=$(echo $1 | sed 's/.pdf//')
# Convert into .eps
pdftops $filename.pdf $filename-temp.ps
ps2eps $filename-temp.ps
mv $filename-temp.eps $filename.eps
rm $filename-temp.ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment