Problem
If you are using YajHFC 0.5.2 or higher with the PDF plugin you may get the following (or a similar) exception when trying to view a received fax:
An error occured displaying the fax "faxNNNNNNNNN.tif": All fill bits preceding EOL code must be 0. java.lang.RuntimeException: All fill bits preceding EOL code must be 0. at com.itextpdf.text.pdf.codec.TIFFFaxDecoder.readEOL(TIFFFaxDecoder.java:1307) at com.itextpdf.text.pdf.codec.TIFFFaxDecoder.decode2D(TIFFFaxDecoder.java:797) at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:237) at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:106) at yajhfc.file.pdf.ITextTIFFFileConverter.convertToHylaFormat(ITextTIFFFileConverter.java:65) at yajhfc.file.MultiFileConverter.convertMultipleFiles(MultiFileConverter.java:102) at yajhfc.file.MultiFileConverter.convertMultipleFilesToSingleFile(MultiFileConverter.java:187) at yajhfc.file.MultiFileConverter.viewMultipleFiles(MultiFileConverter.java:162) at yajhfc.MainWin$ShowWorker.doWork(MainWin.java:491) at yajhfc.util.ProgressWorker.run(ProgressWorker.java:189)
Solution
This seems to be an incompatibility between iText and the TIFF files in your HylaFAX installation. Especially capi4hylafax is known to often produce such files.
So far, no fix from iText is available.
The TIFF files usually work fine with tiff2pdf or common Windows or Linux TIFF viewers.
The best solution for this problem is to install YajHFC 0.5.5 or higher and use the native libtiff plugin.
If you cannot do that, please use the following workaround if you experience this problem:
- Make sure tiff2pdf is installed
-
If you are using Windows Vista, 7 or newer:
Please download tiff2pdf.cmd and place it in the same directory as tiff2pdf.exe. This works around a bug tiff2pdf.exe has on newer Windows versions. - In YajHFC, open the Options dialog.
-
If you use Windows, make sure that under Paths & Viewers the correct path to tiff2pdf is set. (if you have installed tiff2pdf.cmd, this should be the full path to tiff2pdf.cmd, else the path to tiff2pdf.exe)
In Linux, just using the default tiff2pdf (without path) will usually work fine. - Under Paths & Viewers→PDF support (iText), uncheck the option Use iText to convert TIFF→PDF.
- Close the Options dialog with OK
- Now YajHFC should use tiff2pdf to convert the received faxes to PDF. If you still have problems, please write to the yajhfc-user mailing list