added support fo eps/pdf
okay, this basically does what I want, could be a little cleaner, use some more
tinkering, but yay!