You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Ernst Eibensteiner (Updated) (JIRA)" <ji...@apache.org> on 2012/02/29 09:45:58 UTC
[jira] [Updated] (PDFBOX-1241) Better handle of missing offset at
the end of a file
[ https://issues.apache.org/jira/browse/PDFBOX-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ernst Eibensteiner updated PDFBOX-1241:
---------------------------------------
Description:
We came across PDF files that do not have an offset at the end of the file.
This leads to the following exeption:
c:\tmp> java -jar pdfbox-app-1.6.0.jar ExtractText -endPage 1 "On the Insert tab.pdf"
ExtractText failed with the following exception:
java.io.IOException: Error: Expected an integer type, actual=''
at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1384)
at org.apache.pdfbox.pdfparser.PDFParser.parseStartXref(PDFParser.java:6
63)
at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:464)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1088)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:978)
at org.apache.pdfbox.ExtractText.startExtraction(ExtractText.java:196)
at org.apache.pdfbox.ExtractText.main(ExtractText.java:76)
at org.apache.pdfbox.PDFBox.main(PDFBox.java:42)
While these PDFs are non-conforming, it'd be an improvement to allow them to be read and processed.
was:
We came across PDF files that do not have a %%EOF at the end of the file.
This leads to the following exeption:
c:\tmp> java -jar pdfbox-app-1.6.0.jar ExtractText -endPage 1 "On the Insert tab.pdf"
ExtractText failed with the following exception:
java.io.IOException: Error: Expected an integer type, actual=''
at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1384)
at org.apache.pdfbox.pdfparser.PDFParser.parseStartXref(PDFParser.java:6
63)
at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:464)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1088)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:978)
at org.apache.pdfbox.ExtractText.startExtraction(ExtractText.java:196)
at org.apache.pdfbox.ExtractText.main(ExtractText.java:76)
at org.apache.pdfbox.PDFBox.main(PDFBox.java:42)
While these PDFs are non-conforming, it'd be an improvement to allow them to be read and processed.
Summary: Better handle of missing offset at the end of a file (was: Better handle of missing EOF at the end of a file)
You're right. I've edited this issue to handle the missing offset (changed title and text) to correspond to the call stack -> 'Expected an integer type'
> Better handle of missing offset at the end of a file
> ----------------------------------------------------
>
> Key: PDFBOX-1241
> URL: https://issues.apache.org/jira/browse/PDFBOX-1241
> Project: PDFBox
> Issue Type: Improvement
> Components: Parsing, Text extraction
> Affects Versions: 1.6.0
> Environment: All platforms affected
> Reporter: Ernst Eibensteiner
> Attachments: On the Insert tab.pdf
>
>
> We came across PDF files that do not have an offset at the end of the file.
> This leads to the following exeption:
> c:\tmp> java -jar pdfbox-app-1.6.0.jar ExtractText -endPage 1 "On the Insert tab.pdf"
> ExtractText failed with the following exception:
> java.io.IOException: Error: Expected an integer type, actual=''
> at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1384)
> at org.apache.pdfbox.pdfparser.PDFParser.parseStartXref(PDFParser.java:6
> 63)
> at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:464)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1088)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1053)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:978)
> at org.apache.pdfbox.ExtractText.startExtraction(ExtractText.java:196)
> at org.apache.pdfbox.ExtractText.main(ExtractText.java:76)
> at org.apache.pdfbox.PDFBox.main(PDFBox.java:42)
> While these PDFs are non-conforming, it'd be an improvement to allow them to be read and processed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira