pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PDFBOX-4279) ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB
Date Thu, 26 Jul 2018 16:24:00 GMT

     [ https://issues.apache.org/jira/browse/PDFBOX-4279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tilman Hausherr updated PDFBOX-4279:
------------------------------------
    Description: 
{code:java}
java.lang.ArrayIndexOutOfBoundsException: 0
    org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:69)
    org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:308)
    org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:617)
    org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:682)
    org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processTilingPattern(PDFStreamEngine.java:403)
    org.apache.pdfbox.rendering.PageDrawer.drawTilingPattern(PageDrawer.java:283)
{code}
The cause is
{code:java}
  /CS2 CS
  /P2 SCN
{code}
The first line sets a pattern colorspace (its entry is {{[Pattern DeviceGray]}}), the second
line sets an "uncolored tiling pattern" but no color parameter so an empty array is created.
Solution: enlarge the returned array.

  was:
{code:java}
java.lang.ArrayIndexOutOfBoundsException: 0
    org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:69)
    org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:308)
    org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:617)
    org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:682)
    org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
    org.apache.pdfbox.contentstream.PDFStreamEngine.processTilingPattern(PDFStreamEngine.java:403)
    org.apache.pdfbox.rendering.PageDrawer.drawTilingPattern(PageDrawer.java:283)
{code}
The cause is
{code:java}
  /CS2 CS
  /P2 SCN
{code}
The first line sets a pattern colorspace (its entry expects a DeviceGray color), the second
line sets an "uncolored tiling pattern" but no color parameter so an empty array is created.
Solution: enlarge the returned array.


> ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB
> ----------------------------------------------------
>
>                 Key: PDFBOX-4279
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4279
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.11
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.12, 3.0.0 PDFBox
>
>         Attachments: pop-bugzilla62905.pdf
>
>
> {code:java}
> java.lang.ArrayIndexOutOfBoundsException: 0
>     org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:69)
>     org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:308)
>     org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:617)
>     org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:682)
>     org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processTilingPattern(PDFStreamEngine.java:403)
>     org.apache.pdfbox.rendering.PageDrawer.drawTilingPattern(PageDrawer.java:283)
> {code}
> The cause is
> {code:java}
>   /CS2 CS
>   /P2 SCN
> {code}
> The first line sets a pattern colorspace (its entry is {{[Pattern DeviceGray]}}), the
second line sets an "uncolored tiling pattern" but no color parameter so an empty array is
created. Solution: enlarge the returned array.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message