You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/03/13 17:41:47 UTC
[jira] [Comment Edited] (PDFBOX-1983) Unable to add TIF images,
CCITTFactory not working
[ https://issues.apache.org/jira/browse/PDFBOX-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13933508#comment-13933508 ]
Tilman Hausherr edited comment on PDFBOX-1983 at 3/13/14 4:41 PM:
------------------------------------------------------------------
The last comment was the one who helped me fix the bug (done in rev 1577233), because all I had to do was to look at JPEGFactory. I have attached a file created with the sample code.
This bug shows that we need to have a test.
was (Author: tilman):
The last comment was the one who helped me fix the bug (done in rev 1577233), because all I had to do was to look at JPEGFactory.
This bug shows that we need to have a test.
> 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ä
> Assignee: Tilman Hausherr
> Fix For: 2.0.0
>
> Attachments: G4.tif, huhu.pdf
>
>
> As used in the AddImageToPDF example, the following line generates an error with tif image:
> 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)