开发者

Extracting text from PDF : PDFLib vs PDF extract vs pdf2xml [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question

I am looking for a library (if possible available in Java or PHP) in order to extract text from a PDF. There is a lot of software available, including:

  • 3-Heights™ PDF Extract http://www.pdf-tools.com/开发者_开发技巧pdf/pdf-extract-content-metadata-text.aspx

  • PDFlib TET – Text Extraction Toolkit http://www.pdflib.com/products/tet/

  • PDF2XML http://sourceforge.net/projects/pdf2xml/

Which tools would you choose? What do you think of them?

Thank you very much for your kind help!


My favourite is iText (java) but extracting text from a PDF can be fraught with difficulties as the text in the PDF is not alway stored in the order in which it appears.


itext had trouble properly extracting text from the irs i1040.pdf as reported here:

<1> article.gmane.org/gmane.comp.java.lib.itext.general/65680

As near as I can figure out, when the fonts are embedded, it's not always possible to get the right text extracted. See: <2> www.verypdf.com/wordpress/201109/pdf-to-text-converter-cant-extract-text-which-render-by-embedded-fonts-2452.html <3> section 9.10.1 of: www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf

<3> says:

If a font is not defined in one of these ways ... the characters cannot be converted to Unicode values without additional information.

I assume that "conversion to unicode values" is essential for text extraction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜