Text disappearing when converting from PDF to JPG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
kxayrnqohbqvnakmru
Posts: 1
Joined: 2020-03-05T08:50:41-07:00
Authentication code: 1152

Text disappearing when converting from PDF to JPG

Post by kxayrnqohbqvnakmru »

I have a document that is mostly text that I am having trouble converting.

ImageMagick 6.4.3 2013-03-20 (I know this is old but I don't have the option to upgrade it)

Tried on a newer version and it didn't have this problem.
ImageMagick 7.0.7-34 Q16 x86_64 20180520

The input looks a lot like this. 99% of the text is very sharp, but there are a few words that appear as if they were not processed when the scanner generated it's output file.
https://imgur.com/lP6Sdq7

Here's what the output file looks like. Mostly empty, except for these few bits of text.
https://imgur.com/JrGp5fS

Here's the command I'm running and the output.
convert -verbose -density 200 -resize 36% -quality 70 test.pdf test.jpg

"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r200x200" -dFirstPage=1 -dLastPage=1 "-sOutputFile=magick-XXiM0Xex" "-fmagick-XXCgAJUH" "-fmagick-XXbSKAAS"

Any ideas?

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text disappearing when converting from PDF to JPG

Post by fmw42 »

IM 6.4.3 from 2013 is ancient. Certainly likely there could be an issue. Also check the version of Ghostscript and perhaps try to upgrade that. Otherwise, you will need to upgrade IM.

Try proper syntax ordering:

Code: Select all

convert -verbose -density 200 test.pdf -resize 36% -quality 70 test.jpg
For IM 7, use magick in place of convert

Locked