catch exception for badly formated pdf
Merge pull request #10 from guelo/master

Looks good!