2004.03.19 17:50 "[Tiff] txt to tiff", by Soledad Alborno

2004.03.20 15:32 "Re: [Tiff] txt to tiff", by Bob Friesenhahn

Hello, I am searching how to convert txt files to tiff files.

The easiest way is to use a tool like 'enscript' to produce Postscript from the text, and then use Ghostscript in conjunction with libtiff to output a TIFF file.

I beg to differ, Bob. OK, it's easiest *for your*, since you've already setup all this stuff and learned to use it. Anyone else is in for quite an adventure doing it this way.

Certainly less of an adventure than the procedure you describe. :-) I don't recall, did the original poster say he was using Windows?

Using GNU enscript and GNU Ghostscript the procedure would be similar to:

 enscript --output=file.ps file.txt
 gs -dNOPAUSE -dBATCH -q -sOutputFile=file.tiff -sDEVICE=tiffg4 file.ps

If this is to be done often, a pipeline can be used to avoid a temporary file.

Additional options are available for enscript and Ghostscript to adjust the output.


Bob Friesenhahn