23 June 2010

pdf to image in linux

I was looking for something to convert my pdf files to jpg or any other web understandable format in linux.

Here's the workarounds -
$ pdftops   site-structure.pdf   site-structure.ps
$ pstopnm   site-structure.ps

It will convert each pages of ps file to .ppm files.
Just rename .ppm files to .jpg

Now append all image pages -
$ convert  -append   site-structure001.jpg    site-structure002.jpg    site-structure003.jpg   site-structure.jpg

The last file is the final image output.

Done!
Cool I love it.

0 comments:

Post a Comment

Blog Archive