When I try to convert a tiff
file to pdf
file by using itextpdf 5.5.5
, the following exception occurs:
java.lang.RuntimeException: Scanline must begin with EOL code word. at com.itextpdf.text.pdf.codec.TIFFFaxDecoder.readEOL(TIFFFaxDecoder.java:1303) at com.itextpdf.text.pdf.codec.TIFFFaxDecoder.decode2D(TIFFFaxDecoder.java:811) at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:223) at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:315) at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:303) at com.itextpdf.text.Image.getInstance(Image.java:308) at com.itextpdf.text.Image.getInstance(Image.java:242) at com.itextpdf.text.Image.getInstance(Image.java:365) at com.minstone.convert.PicConvertor.convertPicToPdf1(PicConvertor.java:81) at com.minstone.convert.DocConverter$ConvertWork.king2pdf(DocConverter.java:143) at com.minstone.convert.DocConverter$ConvertWork.run(DocConverter.java:99) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
I can open the tiff
file in any image viewer, so it's valid.