[jira] [Comment Edited] (PDFBOX-4176) PDImageXObject doesn't support TIFF although JavaDoc says it does
[ https://issues.apache.org/jira/browse/PDFBOX-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16422113#comment-16422113 ] Tilman Hausherr edited comment on PDFBOX-4176 at 4/2/18 10:46 AM: -- Because there's a bug in the file type detector. The easiest way for you would either be to use {{PDImageXObject createFromFile()}} or to use {{LosslessFactory.createFromImage(ImageIO.read(file))}}. You'll have to use one of these anyway if your production TIFF files are not G3 or G4 encoded. was (Author: tilman): Because there's a bug in the file type detector. The easiest way for you would either be to use {{PDImageXObject createFromFile()}} or to use {{LosslessFactory.createFromImage(ImageIO.read(file))}}. You'll have to use one of These anyway if your production TIFF files are not G3 or G4 encoded. > PDImageXObject doesn't support TIFF although JavaDoc says it does > - > > Key: PDFBOX-4176 > URL: https://issues.apache.org/jira/browse/PDFBOX-4176 > Project: PDFBox > Issue Type: Bug >Affects Versions: 2.0.9 >Reporter: Kamil >Priority: Major > Attachments: tiff.tif > > > This code: > {code} > final PDImageXObject jpeg = PDImageXObject.createFromByteArray(doc, > IOUtils.toByteArray(new FileInputStream(tiffFile)), "tiff.tif"); > {code} > throws: > {code} > java.lang.IllegalArgumentException: Image type not supported: tiff.tif > at > org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromByteArray(PDImageXObject.java:351) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (PDFBOX-4176) PDImageXObject doesn't support TIFF although JavaDoc says it does
[ https://issues.apache.org/jira/browse/PDFBOX-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16422103#comment-16422103 ] Kamil edited comment on PDFBOX-4176 at 4/2/18 10:30 AM: So how {code} ImageIO.read(file) {code} can read it correctly? was (Author: eximius): So how ImageIO.read(file) can read it correctly? > PDImageXObject doesn't support TIFF although JavaDoc says it does > - > > Key: PDFBOX-4176 > URL: https://issues.apache.org/jira/browse/PDFBOX-4176 > Project: PDFBox > Issue Type: Bug >Affects Versions: 2.0.9 >Reporter: Kamil >Priority: Major > Attachments: tiff.tif > > > This code: > {code} > final PDImageXObject jpeg = PDImageXObject.createFromByteArray(doc, > IOUtils.toByteArray(new FileInputStream(tiffFile)), "tiff.tif"); > {code} > throws: > {code} > java.lang.IllegalArgumentException: Image type not supported: tiff.tif > at > org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromByteArray(PDImageXObject.java:351) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (PDFBOX-4176) PDImageXObject doesn't support TIFF although JavaDoc says it does
[ https://issues.apache.org/jira/browse/PDFBOX-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16422084#comment-16422084 ] Kamil edited comment on PDFBOX-4176 at 4/2/18 10:08 AM: To check it, you can use the code from this issue: https://issues.apache.org/jira/browse/PDFBOX-4177 and file from the attachment was (Author: eximius): To check it, you can use the code from this issue: https://issues.apache.org/jira/browse/PDFBOX-4176 and file from the attachment > PDImageXObject doesn't support TIFF although JavaDoc says it does > - > > Key: PDFBOX-4176 > URL: https://issues.apache.org/jira/browse/PDFBOX-4176 > Project: PDFBox > Issue Type: Bug >Affects Versions: 2.0.9 >Reporter: Kamil >Priority: Major > Attachments: tiff.tif > > > This code: > {code} > final PDImageXObject jpeg = PDImageXObject.createFromByteArray(doc, > IOUtils.toByteArray(new FileInputStream(tiffFile)), "tiff.tif"); > {code} > throws: > {code} > java.lang.IllegalArgumentException: Image type not supported: tiff.tif > at > org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromByteArray(PDImageXObject.java:351) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org