PDF to JPG, GIF, PNG conversion shows some horizontal rule

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?".
Post Reply
Anil Yadav

PDF to JPG, GIF, PNG conversion shows some horizontal rule

Post by Anil Yadav »

Version:
ImageMagick: 6.5.4-2 2009-06-30
Ghostscript: 8.63
OS: Windows XP Professional

Hi,

I'm coming across a problem while converting PDF to JPG, GIF or PNG It shows some unwanted horizontal rule in converted files whereas there is no rule in the PDF/PS file. I'm using the following command line:

Code: Select all

convert -density 300 -background white Table118.pdf -trim -scale 2000x1000 Table118.jpg
If I re-apply this code on the same file it surprisingly change the "positions of horizontal rules" and the file size. After every compilation I get a new file size and new positions of horizontal rules.

Can you please look into this and do the needful.


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

Re: PDF to JPG, GIF, PNG conversion shows some horizontal rule

Post by fmw42 »

several possible issues.

1) jpg is lossy as it does compression and may change your output slightly if very thin lines. so try png or gif

2) try supersampling (more) --- set the -density much higher and then scale down appropriately or use -resize (in place of -scale) which uses a better filter. Unfortunately this will be slower.

3) provide a link to your image. The IM folks cannot verify if there is a bug without an image to duplicate the problem,
Post Reply