Details
Description
loading of an fdf file generates the following exception:
java.io.IOException: Unknown dir object c=')' cInt=41 peek=')' peekInt=41 org.apache.pdfbox.io.PushBackInputStream@28d08633
at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:993)
at org.apache.pdfbox.pdfparser.BaseParser.parseCOSArray(BaseParser.java:704)
at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:906)
at org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:157)
at org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:234)
at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:895)
at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:521)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:179)
at org.apache.pdfbox.pdmodel.fdf.FDFDocument.load(FDFDocument.java:206)
at org.apache.pdfbox.pdmodel.fdf.FDFLoaderTestCase.testLoadFailingAttachment(FDFLoaderTestCase.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
this is (still) related the detection of the end of stream.
in the stream data, there is the endstream token: the stream reading then stops, expecting to find cosobjects from then on: that is the reason of the failure.
Attachments
Attachments
Issue Links
- depends upon
-
PDFBOX-2468 Switch FDFDocument.load from PDFParser to NonSequentialParser
- Closed