如何在Java中读取pdf文件

问题描述:

我正在研究一个需要读取pdf文件的java项目.

I am working on a java project that needs to read a pdf file.

我知道可以使用某些外部库,例如 itext .

I know it is possible using some external libraries like itext.

但是可以使用Java inbuild功能读取pdf文件而不使用任何外部库吗?

But is it possible to read a pdf file using java inbuild features without using any external library?

是可以的.为了通过Apache PDFBOX从Java中读取pdf文件.此PDFBOX允许创建新的PDF文档,操纵现有文档以及从文档中提取内容的功能. Apache PDFBox还包括几个命令行实用程序.

Yes it is possible. For reading pdf file from java gone through Apache PDFBOX. This PDFBOX allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities.