Hello,

I am trying to convert tiff files to PDF and I get the below exception.I
get the same exception with all the tif files I have tried.
Kindly assist.


byte[] pngByteArray = FileUtils.readFileToByteArray(new
File("C:\\CCITT_1.TIF"));
InputStream contentStream = new ByteArrayInputStream(pngByteArray);
PDDocument doc = new PDDocument();

        PDImageXObject ximage3 = CCITTFactory.createFromByteArray(doc,
pngByteArray);


Exception in thread "main" java.io.IOException: FillOrder 2 is not supported
at
org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.extractFromTiff(CCITTFactory.java:408)
at
org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromRandomAccessImpl(CCITTFactory.java:261)
at
org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromByteArray(CCITTFactory.java:133)
at
org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory.createFromByteArray(CCITTFactory.java:109)

Thanks,
Vikram

Reply via email to