[ https://issues.apache.org/jira/browse/PDFBOX-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491092#comment-16491092 ]
ASF subversion and git services commented on PDFBOX-4227: --------------------------------------------------------- Commit 1832260 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1832260 ] PDFBOX-4227: be resilent if XMP metadata can't be read > java.util.zip.DataFormatException: invalid distance too far back > ---------------------------------------------------------------- > > Key: PDFBOX-4227 > URL: https://issues.apache.org/jira/browse/PDFBOX-4227 > Project: PDFBox > Issue Type: Bug > Affects Versions: 2.0.9 > Reporter: Michael Miller > Priority: Major > Attachments: testCorrupt.pdf > > > I get a zip exception with the attached PDF file, which renders successfully > in a couple of PDF viewers I tried. > ByteArrayInputStream pdfInputStream = new ByteArrayInputStream(pdfByteArray); > PDFMergerUtility merger = new PDFMergerUtility(); > merger.addSource(pdfInputStream); > ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); > merger.setDestinationStream(outputStream); > merger.mergeDocuments(MemoryUsageSetting.setupMainMemoryOnly()); > > PDF file attached. > Stack Trace: > java.io.IOException: java.util.zip.DataFormatException: invalid distance too > far back > at org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:83) > at org.apache.pdfbox.filter.Filter.decode(Filter.java:87) > at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77) > at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175) > at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:163) > at > org.apache.pdfbox.multipdf.PDFMergerUtility.appendDocument(PDFMergerUtility.java:516) > at > org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:263) > ... > Caused by: java.util.zip.DataFormatException: invalid distance too far back > at java.util.zip.Inflater.inflateBytes(Native Method) > at java.util.zip.Inflater.inflate(Inflater.java:259) > at java.util.zip.Inflater.inflate(Inflater.java:280) > at org.apache.pdfbox.filter.FlateFilter.decompress(FlateFilter.java:108) > at org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:74) > ... 35 more -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org