[ 
https://issues.apache.org/jira/browse/PDFBOX-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13899563#comment-13899563
 ] 

Tilman Hausherr commented on PDFBOX-1094:
-----------------------------------------

The "survey" test file brings an exception:

java.lang.IllegalArgumentException: Width (0) and height (1) must be > 0
        at java.awt.image.SampleModel.<init>(SampleModel.java:126)
        at 
java.awt.image.ComponentSampleModel.<init>(ComponentSampleModel.java:146)
        at 
java.awt.image.PixelInterleavedSampleModel.<init>(PixelInterleavedSampleModel.java:87)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:641)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:278)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:212)
        at 
java.awt.image.ComponentColorModel.createCompatibleWritableRaster(ComponentColorModel.java:2825)
        at 
org.apache.pdfbox.pdmodel.graphics.pattern.tiling.ColoredTilingPaint.createContext(ColoredTilingPaint.java:108)
        at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:83)
        at 
sun.java2d.pipe.SpanShapeRenderer$Composite.startSequence(SpanShapeRenderer.java:56)
        at 
sun.java2d.pipe.SpanShapeRenderer.renderSpans(SpanShapeRenderer.java:194)
        at sun.java2d.pipe.SpanShapeRenderer.fill(SpanShapeRenderer.java:116)
        at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
        at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2466)
        at org.apache.pdfbox.pdfviewer.PageDrawer.fillPath(PageDrawer.java:810)
        at 
org.apache.pdfbox.util.operator.pagedrawer.FillEvenOddRule.process(FillEvenOddRule.java:57)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:532)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:260)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:227)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:209)
        at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:151)
        at org.apache.pdfbox.util.RenderUtil.renderPage(RenderUtil.java:212)
        at org.apache.pdfbox.util.RenderUtil.convertToImage(RenderUtil.java:177)
        at org.apache.pdfbox.util.TestRendering.render(TestRendering.java:78)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runners.Suite.runChild(Suite.java:127)
        at org.junit.runners.Suite.runChild(Suite.java:26)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

I did have the same exception with another of the files mentioned above. Just a 
thought (I haven't fully understood the specification yet): is it correct to 
handle the transformation in the constructor, or should it possibly handled 
(reversely) in the getRaster() method? I'm asking this because in the type 1 
shading, I had to do it this way.

> Pattern colorspace support
> --------------------------
>
>                 Key: PDFBOX-1094
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1094
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 1.6.0
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>         Attachments: PDF32000_2008_pg737.pdf
>
>
> PDFBox doesn't support PDPattern colorspaces



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to