[ https://issues.apache.org/jira/browse/PDFBOX-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709793#comment-15709793 ]
ASF subversion and git services commented on PDFBOX-3608: --------------------------------------------------------- Commit 1772121 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1772121 ] PDFBOX-3608: ignore garbage in big endian byte/short tiff tags, as suggested by Št?pán Schejbal > byte/short tiff tags not read correctly > --------------------------------------- > > Key: PDFBOX-3608 > URL: https://issues.apache.org/jira/browse/PDFBOX-3608 > Project: PDFBox > Issue Type: Bug > Components: PDModel > Affects Versions: 2.0.3 > Reporter: Štěpán Schejbal > Priority: Minor > Fix For: 2.0.4, 2.1.0 > > Attachments: fix.patch, test-files.zip > > > All tag values (even byte/short) are currently read as a long value. That > works fine as long as the value is padded with 0. Unfortunately, the very > first file from production environment I tried to process with CCITTFactory > failed, because short value was not padded with 0 (the complete tag data is > 1201 0300 0100 0000 0100 3832 - little endian): > java.io.IOException: Orientation 842530817 is not supported > at > org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.extractFromTiff(CCITTFactory.java:392) > at > org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromRandomAccessImpl(CCITTFactory.java:219) > at > org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromFile(CCITTFactory.java:167) > at > org.apache.pdfbox.pdmodel.graphics.image.CCITTFactoryTest.testCreateFromRandomAccessSingle(CCITTFactoryTest.java:66) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org