catch bad pdf exception