Page 1 of 1

pdf2jpg with fancy black squares

Posted: 2009-01-28T10:51:58-07:00
by privet
I'm trying to convert a PDF to JPG with convert.exe.
The PDF-File contains tables and lists with text.
I'm trying to get a very sharp and readable result.

Unfortunately, the list-icons in the result are big black squares in the JPG-file instead of the original tiny round dots...

my call:
convert -trim -posterize 9 +matte -geometry 650 -linewidth 1 -identify -enhance +dither -colors 16 +contrast +contrast -density 88 -black-point-compensation -quality 100 -unsharp 0.7x1.1+2.0+0 2.pdf 2.jpg

Is there a possibility to get a small and beauty icon at converting lists in PDF?

Example: http://www.nabble.com/file/p21711416/pdf2pic_list.jpg
input-PDF: http://www.nabble.com/file/p21711416/_table_0.pdf

Re: pdf2jpg with fancy black squares

Posted: 2009-01-28T12:29:19-07:00
by el_supremo
ImageMagick uses Ghostscript to do the PDF conversion so you need to check whether you are using a recent version of GS. I tried your command with GS 8.63 and it uses dots.

Your command line looks overly complex too. I used this:

Code: Select all

convert -density 300 2.pdf -colors 16 -resize 25%x25% -quality 100 2.jpg
You may find that starting with a high density and then resizing it down will produce a better quality final image, although it will require more CPU time to do the conversion.
Also, JPG is not a good format when saving a text image. PNG or GIF are better.

Pete

Re: pdf2jpg with fancy black squares

Posted: 2009-01-28T18:05:22-07:00
by anthony
Also you may be getting a lot of trouble due to youre reading the input image AFTER giving all the options.

Try just setting the input density, reading the PDF, then applying the operators to that image before outputing.

That is do things in the order you want them done, including reading of the image!

See IM Examples, Basics for more details
http://www.imagemagick.org/Usage/basics/

Re: pdf2jpg with fancy black squares

Posted: 2009-01-29T03:12:21-07:00
by privet
SUCCESS:

1. using GS 8.63 instead of 8.00 solved the problem with the black squares.
I have now the tiny dots as list-icons!

2. I put the parameter 'density' and the input-pdf-filename on the beginning
of the parameter chain. The result: the pics are now more readable!

Thanks a lot for the hints!