[
https://issues.apache.org/jira/browse/PDFBOX-518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Duffy updated PDFBOX-518:
--------------------------------
Attachment: survey.pdf
flate.patch
I found the root cause of this error. Line 241 of FlateFilter reads too many
bytes - actline is sized to fit a zero pixel followed by the row data, whereas
an extra bpp bytes are read into it. The attached patch fixed the issue. A PDF
afftected by it is also attached.
> ArrayIndexOutOfBoundsException in PDInlinedImage.java
> -----------------------------------------------------
>
> Key: PDFBOX-518
> URL: https://issues.apache.org/jira/browse/PDFBOX-518
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 0.8.0-incubator
> Reporter: Andrew Duffy
> Priority: Minor
> Attachments: flate.patch, survey.pdf
>
>
> I can't post a sample PDF, but the trace is:
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> org.apache.pdfbox.pdmodel.graphics.xobject.PDInlinedImage.createImage(PDInlinedImage.java:171)
> at
> org.apache.pdfbox.util.operator.pagedrawer.BeginInlineImage.process(BeginInlineImage.java:57)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:510)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:223)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:182)
> at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:92)
> at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:686)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.