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

Tilman Hausherr updated PDFBOX-1147:
------------------------------------

    Attachment: stream2.lzw
                stream.lzw
                stream.decoded

I rewrote the LZW encoder too. Surprise: when decoding the stream and encoding 
it myself, I got a smaller file than before. (I decoded it again to check). I 
attach the decoded and the encoded streams, if there's a need in the future. I 
found three more test files (hexnumberproblem.pdf, 205-T05140.pdf and 
welcome.pdf) with LZW encoding in the jar files that were removed from the 
project and they all pass.

I am also removing 4 files that were only used by the LZW filter and won't be 
needed anymore.

> Printing a PDF with an image inside show black.
> -----------------------------------------------
>
>                 Key: PDFBOX-1147
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1147
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.6.0
>         Environment: Windows XP SP3 32 bit 
> Java 1.6.0_27
>            Reporter: Rafa Hernandez
>            Assignee: Tilman Hausherr
>              Labels: LZW, image, print
>         Attachments: p1logo.pdf, pdfbox-1147.pdf-1.png, stream.decoded, 
> stream.lzw, stream2.lzw
>
>
> I have a PDF with a image inside.
> When i print the PDF the image show corrupted similar a black area.
> In the java console:
> 25-oct-2011 13:12:39 org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap 
> getRGBImage
> GRAVE: java.io.StreamCorruptedException: Error: data is null
> java.io.StreamCorruptedException: Error: data is null
>       at org.apache.pdfbox.filter.LZWFilter.decode(LZWFilter.java:82)
>       at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:301)
>       at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:229)



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

Reply via email to