Error "All fill bits preceding EOL code must be 0."


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(
    at com.itextpdf.text.pdf.codec.TIFFFaxDecoder.decode2D(
    at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(
    at com.itextpdf.text.pdf.codec.TiffImage.getTiffImage(
    at yajhfc.file.pdf.ITextTIFFFileConverter.convertToHylaFormat(
    at yajhfc.file.MultiFileConverter.convertMultipleFiles(
    at yajhfc.file.MultiFileConverter.convertMultipleFilesToSingleFile(
    at yajhfc.file.MultiFileConverter.viewMultipleFiles(
    at yajhfc.MainWin$ShowWorker.doWork(


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:

  1. Make sure tiff2pdf is installed
  2. 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.
  3. In YajHFC, open the Options dialog.
  4. 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.
  5. Under Paths & ViewersPDF support (iText), uncheck the option Use iText to convert TIFF→PDF.
  6. Close the Options dialog with OK
  7. 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