Converting pdf to png

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
sanojmn

Converting pdf to png

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting pdf to png

Post by fmw42 »

try +adjoin

convert image.pdf +adjoin image.png

see

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

Re: Converting pdf to png

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting pdf to png

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting pdf to png

Post 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!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
sanojmn

Re: Converting pdf to png

Post 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
Post Reply