Hi everyone,
I'm trying to parse a PDF file that is opened in Chrome. Here is the relevant code:
Main Class:
ReadPDF Class:
Console error message:
Exception in
thread "main" java.io.IOException: Error: End-of-File, expected line
at org.apache.pdfbox.pdfparser.BaseParser.readLine(BaseParser.java:1519)
at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:360)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:186)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1230)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1197)
at switzerlandDB.ReadPDF.readPDF(ReadPDF.java:36)
at switzerlandDB.SwitzerlandDB.main(SwitzerlandDB.java:1182)
The error "at switzerlandDB.ReadPDF.readPDF(ReadPDF.java:36)" referes to this line:
The error at "switzerlandDB.SwitzerlandDB.main(SwitzerlandDB.java:1182)" referes to this line:
Anyone knows what am I doing wrong?
Thank you!