[
https://issues.apache.org/jira/browse/PDFBOX-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-1983:
------------------------------------
Attachment: G4.tif
Does this happen with all TIFF files, or just with one of them? Sample TIFF
file attached.
> Unable to add TIF images, CCITTFactory not working
> --------------------------------------------------
>
> Key: PDFBOX-1983
> URL: https://issues.apache.org/jira/browse/PDFBOX-1983
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Joel Kääpä
> Fix For: 2.0.0
>
> Attachments: G4.tif
>
>
> As used in the AddImageToPDF example, the following line generates an error
> with tif image:
> ximage = CCITTFactory.createFromRandomAccess(doc, new RandomAccessFile(new
> File(image),"r"));
> PDImageXObject ximage = CCITTFactory.createFromRandomAccess(document, new
> RandomAccessFile(new File(ImagePath), "r"));
> java.io.IOException: Stream was not read
> at org.apache.pdfbox.cos.COSStream.getDecodeResult(COSStream.java:235)
> at
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:80)
> at
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:70)
> at
> org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromRandomAccess(CCITTFactory.java:50)
--
This message was sent by Atlassian JIRA
(v6.2#6252)