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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
fpieters
Posts: 2
Joined: 2019-06-28T07:52:22-07:00
Authentication code: 1152

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

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
fpieters
Posts: 2
Joined: 2019-06-28T07:52:22-07:00
Authentication code: 1152

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

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
Post Reply