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

Tilman Hausherr updated PDFBOX-3482:
------------------------------------
    Attachment: PDFBox3482.java

The troublesome segment is here:

{code}
Root/Pages/Kids/[0]/Resources/XObject/Fm1/Resources/XObject/Fm3

  481.5 36 252 90 re
  W
  n
  0.27 1 1 0.3 k
  /Gs1 gs
  523.1065 36.0898 m
  523.1065 41.3128 l
  528.1475 41.3128 l
  528.1475 40.9548 l
  523.6325 40.9548 l
  523.6325 38.9028 l
  527.6915 38.9028 l
  527.6915 38.5448 l
  523.6325 38.5448 l
  523.6325 36.4478 l
  528.1975 36.4478 l
  528.1975 36.0898 l
  h
  f
{code}
I created some code that draws the same shape. It is a 90° rotated "m" that is 
clipped and filled. It is scaled big here so that you see what it is. To 
reproduce what you do, you should remove the translate and change the scale to 
something small, e.g. 0.1 until you get the effect.

There are some openjdk issues that look like your problem, e.g. this one:
https://bugs.openjdk.java.net/browse/JDK-8048782



> RasterFormatException: (y + height) is outside raster creating Thumbnail
> ------------------------------------------------------------------------
>
>                 Key: PDFBOX-3482
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3482
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.2
>         Environment: OpenSuse Linux, Apache Tomcat 7.0.70, Java Oracle JDK 
> 1.8.0_U102
>            Reporter: George Sexton
>            Priority: Minor
>             Fix For: 2.0.4, 2.1.0
>
>         Attachments: 2015-Lambs-to-Leaders-posterv04.pdf, PDFBox3482.java, 
> log4j.txt
>
>
> Attempting to extract a thumbnail image from the attached PDF using 
> pdfbox-2.0.3-20160902.161822-193.jar throws the exception:
> java.awt.image.RasterFormatException: (y + height) is outside raster
>       at 
> sun.awt.image.IntegerInterleavedRaster.createWritableChild(IntegerInterleavedRaster.java:470)
>       at 
> sun.awt.image.IntegerInterleavedRaster.createChild(IntegerInterleavedRaster.java:514)
>       at 
> sun.java2d.pipe.GeneralCompositePipe.renderPathTile(GeneralCompositePipe.java:106)
>       at sun.java2d.pipe.AAShapePipe.renderTiles(AAShapePipe.java:201)
>       at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:159)
>       at sun.java2d.pipe.AAShapePipe.fill(AAShapePipe.java:68)
>       at 
> sun.java2d.pipe.PixelToParallelogramConverter.fill(PixelToParallelogramConverter.java:164)
>       at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
>       at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2525)
>       at org.apache.pdfbox.rendering.PageDrawer.fillPath(PageDrawer.java:626)
>       at 
> org.apache.pdfbox.contentstream.operator.graphics.FillNonZeroRule.process(FillNonZeroRule.java:36)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processTransparencyGroup(PDFStreamEngine.java:213)
>       at 
> org.apache.pdfbox.rendering.PageDrawer.access$1000(PageDrawer.java:89)
>       at 
> org.apache.pdfbox.rendering.PageDrawer$TransparencyGroup.<init>(PageDrawer.java:1229)
>       at 
> org.apache.pdfbox.rendering.PageDrawer$TransparencyGroup.<init>(PageDrawer.java:1163)
>       at 
> org.apache.pdfbox.rendering.PageDrawer.showTransparencyGroup(PageDrawer.java:1127)
>       at 
> org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:66)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processTransparencyGroup(PDFStreamEngine.java:213)
>       at 
> org.apache.pdfbox.rendering.PageDrawer.access$1000(PageDrawer.java:89)
>       at 
> org.apache.pdfbox.rendering.PageDrawer$TransparencyGroup.<init>(PageDrawer.java:1229)
>       at 
> org.apache.pdfbox.rendering.PageDrawer$TransparencyGroup.<init>(PageDrawer.java:1163)
>       at 
> org.apache.pdfbox.rendering.PageDrawer.showTransparencyGroup(PageDrawer.java:1127)
>       at 
> org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:66)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
>       at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:94)
>       at 
> com.mhsoftware.graphics.ImageHelper.getPDFThumbnail(ImageHelper.java:583)



--
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

Reply via email to