Add PDF support for Paperclip
Some bug fixes