Searching words in PDF and Extracting it using iTe

2019-01-15 12:00发布

问题:

I recently downloaded iText 5.3.3 and i'm having a bit of a trouble using it.

What classes do i use to Search Words and Extract them from the PDF and display the text in Android?

I have seen the class PdfTextExtractor, i want to know in the class there is a method with a parameter of TextExtractionStrategy strategy. what TextExtractionStrategy are they referring to?

    public static String getTextFromPage(PdfReader reader,
                                 int pageNumber,
                                 TextExtractionStrategy strategy)

回答1:

You can check these links for it, it also tell you about TextExtractionStrategy (last link):

http://itextpdf.com/examples/iia.php?id=275
http://itextpdf.com/examples/iia.php?id=277
http://itextpdf.com/examples/iia.php?id=278
http://api.itextpdf.com/itext/com/itextpdf/text/pdf/parser/TextExtractionStrategy.html