I think the apache project has packages for working with pdf files.
It's not part of Java SE.