Page 1 of 1

Converting pdf to png

Posted: 2008-12-09T23:02:56-07:00
by sanojmn
Hi..

I am trying to convert pdf to png using command-line, it is converting whole file to one png file. Here it should convert to so many pages, that how many pages pdf contains. But it is converting to only one file. What would be the problem of this.

Here am using Imagemagick 6.4.7 and OS is fedora 7.

what am giving the command, convert input.pdf output.png. But there is no problem while converting to jpg. What would be the reason for this.

And I have another question. Which output is good like jpg or png. I want less file with good quality.

Please help me.

Sanoj

Re: Converting pdf to png

Posted: 2008-12-09T23:13:42-07:00
by fmw42
try +adjoin

convert image.pdf +adjoin image.png

see

http://www.imagemagick.org/script/comma ... php#adjoin

Re: Converting pdf to png

Posted: 2008-12-09T23:50:43-07:00
by sanojmn
fmw42 wrote:try +adjoin

convert image.pdf +adjoin image.png

see

http://www.imagemagick.org/script/comma ... php#adjoin

Hi ..

Here is another problem, while converting to png I am getting this error. It means it is converting to png but if I open the file getting this message in the browser.

The image "http://www.ddd.com/fff/team3-6.png" cannot be displayed, because it contains errors.

But while converting to jpg or gif etc... I can open the file. There is no problem to open. Only problem with png.

Please help me.

Sanoj

Re: Converting pdf to png

Posted: 2008-12-09T23:55:43-07:00
by fmw42
Sorry, I don't know why png should not work. Is your png delegate library properly installed?

what do you get when you type

convert -list configure

and look at the line starting with DELEGATES. Does it include png?

How old is your png delegate library?

see http://www.imagemagick.org/download/delegates/

but there may be even newer versions.

Re: Converting pdf to png

Posted: 2008-12-10T00:38:47-07:00
by anthony
Note that PNG can NOT save more than one image in one file.
The +adjoin is thus automatic and usless.


So question becomes -- what do you mean it saves all the pages into one image? It does not make any sense!

Re: Converting pdf to png

Posted: 2008-12-10T04:19:21-07:00
by sanojmn
Hi...

I have fixed the problem. I uninstalled my ImageMagick and reinstalled. Now it is working properly.

Thank you for all to helped me.

Sanoj