Skip to content

Instantly share code, notes, and snippets.

@cossio
Created December 14, 2017 20:36
Show Gist options
  • Save cossio/dfa3afcd0097399e4b33c3e9d925126d to your computer and use it in GitHub Desktop.
Save cossio/dfa3afcd0097399e4b33c3e9d925126d to your computer and use it in GitHub Desktop.
Shell script to convert PDF to encapsulated PostScript.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment