Page 1 of 1

Problem Converting from PDF to TIF

Posted: 2008-12-03T10:33:11-07:00
by kyle h.
Background:

We have 2 environments.

Both are Win2003 Server boxes w/ SP2, both use ImageMagick 6.2.6 Q8.

Both use this command: convert -density 200x200 -dither -compress group4 E:\file.pdf -monochrome E:\file.tif

1 environment this works and has been working fine for several years. More recently we started using the other environment, and we are not getting the same results.


The Problem:

The files that are being converted are forms with typed text on them. We see the problem with words typed in all uppercase. Certain letters are slightly larger than the rest of the font.

I've been working with ImageMagick for about 2 days now. I started by installing the new 6.4.6 Q8 version, which fixes the problem, but you need to adjust the dither option (which I'm not sure is even necessary? redundant with the use of -monochrome?)

So going back to using version 6.2.6 Q8, I started adjusting the options used and it seems like the problem is in the -density 200x200.

I was about to start using the debug option but I'm not sure which debug event to use. Any thoughts?

Re: Problem Converting from PDF to TIF

Posted: 2008-12-03T19:11:01-07:00
by anthony
-dither was generally not used as it was the default.

In a recent change it now takes an argument (type of dither) which would make the above fail.

Leave it off to avoid problems.

-monochrome does not understand or respect +/-dither setting. A -monochrome without dithering is after all just a -threshold.

See IM examples, Quantization and Dithering for more info.

Re: Problem Converting from PDF to TIF

Posted: 2008-12-04T06:31:56-07:00
by kyle h.
Ok, so I adjusted my command line options to this: convert -density 200x200 -compress group4 D:\file.pdf -threshold 50 D:\file.tif

I still have the font issues, that I think is caused by the -density 200x200 option.

Is there a library that the -density option uses that might be corrupt?

Re: Problem Converting from PDF to TIF

Posted: 2008-12-04T07:27:19-07:00
by kyle h.
Ok back with more info.

I've adjusted the -density up and down and that seems to fix it, something about the ~200x200 area that causes the fonts to get tweaked.

I went up to 300x300, which fixes it, but quickly realized the file size was going to be too large for our application.

So I took it down to 150x150, looks fine.

Brought it up in increments to 190x190 where it distorts. So at 185x185 it looks fine.

But the question still remains, why does this work on one machine and not the other?

Re: Problem Converting from PDF to TIF

Posted: 2008-12-04T11:49:52-07:00
by fmw42
Do you have the exact same font file (not just font name)?

Do you have the exact same versions of ghostscript and possibly freetype installed on both machines?

Do you have multiple copies of IM or ghostscript or freetype installed and if so do you know which one you are actually using?

Just some things to check.

Re: Problem Converting from PDF to TIF

Posted: 2008-12-04T12:43:47-07:00
by kyle h.
Problem solved.


There was a different version of ghost script on the problematic system, ghost script 8.54.

Thanks for your help!