它显示字母但按阿拉伯语的相反顺序我使用以下代码
PDDocument pddDocument = PDDocument.load(new File("test1.pdf"));
PDFTextStripper textStripper = new PDFTextStripper();
TextNormalize normalize = new TextNormalize("UTF-8");
String Text = textStripper.getText(pddDocument);
Text=normalize.makeLineLogicalOrder(Text, true);
Text = normalize.normalizePres(Text);
Text = normalize.normalizeDiac(Text);
System.out.println(Text);
答案 0 :(得分:5)
从http://site.icu-project.org/download/49#TOC-ICU4J-Download下载icu4j-49_1.jar并将其放入类路径
解决了这个问题然后重写代码如下
PDDocument pddDocument = PDDocument.load(new File("test1.pdf"));
PDFTextStripper textStripper = new PDFTextStripper();
String Text = textStripper.getText(pddDocument);
System.out.println(Text);