2003.09.05 01:39 "[Tiff] Problems with Postscript output from tiff2ps", by Morten Bagai
On Thursday, Sep 4, 2003, at 17:15 America/Los_Angeles, Tom Kacvinsky wrote:
We would need to see the TIFF file, too.
Hmm... I would like to do that, but it just strikes me that this would be a problem. Our company is in the legal business, and the files in question contain someone's actual medical records and other sensitive data. I could of course garble names and such, but I am afraid that this would invalidate the exercise as such as the files i'd be sending you were different than my actual ones. This would of course apply to the Postscript files as well. Let me see what I can do to come up with a test that doesn't involve confidential data. Meanwhile, thanks for the response.
On Thu, 4 Sep 2003, Morten Bagai wrote:
I am using libtiff with Ghostscript on redhat 7.3 in a solution that automates conversion of large, group4 compressed, multi-page tiff files to pdf files. The way I am doing this is basically by piping outfrom tiff2ps into the ps2pdf utility that comes with Ghostscript. Recently, I have run into a problem the postscript output created by tiff2ps. Since our tiff files are generated by some arcane batch scanning program, my solution will occasionally encounter a tiff file that has a corrupt page or two in it. Opening the source tiff file in any tiff viewer works fine, and you can see that all or part of the page in question is 'blacked out' or munged. When tiff2ps handles a file like this, it will generate the postscript output without any errors but there is something wrong with the result as ghostscripts pdf interpreter chokes on it and exits with an i/o error. The resulting pdf file has all the pages leading up to the bad page. I tried opening the postscript generated by tiff2ps in Adobe Acrobat 6 Pro, and I get exactly the same error as with Ghostscript. This led me to try and open the tiff file with Acrobat and saving it as a postscript file. If use Acrobat's postscript output with Ghostscript the pdf generation works just fine, leading me to conclude that there is something wrong with tiff2ps' postscript output.
Here's an example of what I do on the command line:
tiff2ps -a2 /pathto/sourcefile.tif | ps2pdf -r240 -dProcessColorModel=/DeviceGray -dPDFSETTINGS=/printer - /pathto/destinationfile.pdf
My setup is the following:
libtiff version 3.5.7-2
redhat 7.3 i386
ghostscript 6.52 (but it appears this is not the issue even though i do plan on upgrading)
I'd be very grateful for any suggestions as to what might be going wrong, options to tinker with, known bugs etc. Also, I'd be interested in knowing if the beta version of libtiff 3.6 is supposed to fix anything that might impact this issue. I can provide the postscript files generated by libtiff and acrobat for the same file if that helps.
>> Tiff mailing list
Tiff mailing list
3949 Los Feliz Blvd Apt 612
Los Angeles, 90027 CA
Cell: +01 323-893-7501
Email: morten AT bagai.com
AIM: membrane AT mac.com