我有阅读pdf的程序。我正在使用库pdfbox for java 大多数pdf正在加载,我得到文本。但在一个pdf中我得到:
线程中的异常" AWT-EventQueue-0" java.lang.RuntimeException:java.io.IOException:Value>不是整数:> 86714696448948619000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 at org.apache.pdfbox.pdfparser.PDFStreamParser $ 1.tryNext(PDFStreamParser.java:191) 在org.apache.pdfbox.pdfparser.PDFStreamParser $ 1.hasNext(PDFStreamParser.java:198) at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:255) at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235) at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:215) at org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:460) at org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:385) at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:344)
at第12行(String x1 = stripper.getText(doc);)
PDDocument doc ;
doc = PDDocument.load(file.getPath());
if(doc!=null){
stripper = new PDFTextStripper();
stripper.setSortByPosition( true );
stripper.setStartPage( 28 );
stripper.setEndPage(doc.getNumberOfPages());//Integer.MAX_VALUE );
PDFParser parser;
parser = new PDFParser(new FileInputStream(file));
parser.parse();
String x1 = stripper.getText(doc);
任何人都知道如何修复或解决这个问题