java 在 PDF 中搜索单词并在 android 中使用 iText 提取它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12938397/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Searching words in PDF and Extracting it using iText in android
提问by Christian
I recently downloaded iText 5.3.3 and i'm having a bit of a trouble using it.
我最近下载了 iText 5.3.3,但在使用时遇到了一些麻烦。
What classes do i use to Search Words and Extract them from the PDF and display the text in Android?
我使用哪些类来搜索单词并从 PDF 中提取它们并在 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?
我见过PdfTextExtractor类,我想知道在类中有一个参数为TextExtractionStrategy strategy
. 他们指的是什么 TextExtractionStrategy ?
public static String getTextFromPage(PdfReader reader,
int pageNumber,
TextExtractionStrategy strategy)
回答by Amit Hooda
You can check these links for it, it also tell you about TextExtractionStrategy
(last link):
您可以查看这些链接,它还会告诉您TextExtractionStrategy
(最后一个链接):
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
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