Catch pdf error.