Improve PDF parsing