Ghostscript problems

Posted on December 10th, 2007 in FaxIt Nice by declanshanaghy

After installing JODConverter the other day i was feeling ecstatic about how we can now handle document conversion in FIN 3.0 . However upon first use i got hit with a brick in the face!

First let me explain the document conversion process in FIN 3.0. As you know you can upload multiple files to send in a fax, so the first phase converts all these files to TIFF format and then concatenates them together. Going thru OpenOffice there is even one more intermediate step. Files converted by OpenOffice come out as PDFs which are then converted to TIFF.

Now, Hylafax was complaining that the final TIFF file was invalid. “How can that be?” I wondered. Upon further investigation i discovered that the XResolution field in the TIFF file was set to 0. Where in the chain was this happening? Was the PDF from OO.org screwed? Was the intermediate TIFF from that PDF invalid, or was the concatenation causeing the prolem, Well I finally realized that it was getting set to 0 during the phase of the concat phase. But that was not the real culprit. I discovered that FC7 comes with ESP Ghostscript installed and our current server uses AFPL Ghostscript. The solution was to compile and install AFPL GS in /usr/local.

After doing this, everything worked nicely. The only thing bugging me now is that conversion of some PS files to PDF will fail because GS cant find the fonts. They “should” be installed, so thats going to take some digging to figure out.

Update 12/12/2007

Well, i figured out where to install the ghostscript fonts. But problems with concatenating TIFF files continue to plague me. I really can’t figure out why the files are being corrupted with this particular combination of ODConverter/ghostscript & hylafax. It works perfectly fine on two.350nice.com (albeit manually) i haven’t installed the latest version of OO.org.

For now I’m dropping back to a workaround which allows FIN 3.0 to handle multiple  input files to the fax server rather than concatenating them all together. This is ugly though because the fax preview is now multiple files rather than a single file. When the concat issue is resolved, it’ll be a simple matter of plugging in the component that does this operation in the doc conversion pipeline.

Post a comment