Page 1 of 1

white pages when converting from PDF to TIFF (fax compression)

Posted: 2019-06-28T08:00:25-07:00
by fpieters
hi There,

We are working with Imagemagick for several years now to convert PDF files to TIFF files for sending them with a faxserver. We ure the -compress Fax option. Since a couple of days we get blank pages. This while we didn't do any updates on the server.
I use the following command:

convert -density 210x196 FILEIN.PDF -background white -units PixelsPerInch -extent 1728x2444 -monochrome -compress Fax FILEOUT.TIFF

When I use -compress Zip of -compress LZW (or no compress at all) I get perfect TIFF files. However, they seems not te be in a correct fax format because our faxserver won't send them and says it is a bad tif.

We are using the following version :

Version: ImageMagick 6.7.8-9 2019-02-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

We are running on Centos 7.

Hope anyone can help.
Thanks,
Frank

Re: white pages when converting from PDF to TIFF (fax compression)

Posted: 2019-06-28T08:52:54-07:00
by snibgo
fpieters wrote:Since a couple of days we get blank pages. This while we didn't do any updates on the server.
Well, something has changed. What?

Your version of IM "6.7.8-9 2019-02-01" is very old. I don't use such old software, so can't test your command. You might consider upgrading to a more recent version.

Re: white pages when converting from PDF to TIFF (fax compression)

Posted: 2019-06-28T08:57:19-07:00
by fmw42
His version by date was patched Jan 2 2019. I suspect the patch was not correct or insufficient. Linux distributions do not update the version when they patch. But more importantly, they often only patch for security issues. So bug fixes or enhancements may not be included.

That does not mean that something did change in ImageMagick.

Post your PDF file and we can check it.

Also be sure your version of Ghostscript is relatively current and not 9.26 or 9.27. They are known to have bugs.

Re: white pages when converting from PDF to TIFF (fax compression)

Posted: 2019-07-01T04:46:48-07:00
by fpieters
Hi There,
I just solved the problem. I useed Ghostscript to convert to the fax format with the following command:
gs -q -sDEVICE=tiffg3 -r204x196 -dBATCH -dPDFFitPage -dNOPAUSE -dQUIET -dBATCH -sOutputFile=OUT.TIFF IN.PDF

This works fine. I found this solution at: https://www.soft-switch.org/spandsp_faq/ar01s14.html

Regarding the comment of fmw42 (Fred) I should expect that convert is also using ghostscript to convert the file to fax-format. While ghostscript works theree should be something wrong with convert is it calls Ghostscript internally.

I could post a demo-pdf because they are confidential.

Greetings,
Frank

Re: white pages when converting from PDF to TIFF (fax compression)

Posted: 2019-07-01T09:25:01-07:00
by fmw42
Post an example PDF. Perhaps the file is transparent and you need to flatten against white. Just setting the background color to white may not resolve it. Otherwise, you can change the arguments in the delegates.xml file that calls Ghostscript for PDF files