How to convert PDF file to JPG or PNG in ubuntu?

>> Saturday, 9 June 2012

How to convert PDF file to JPG or PNG in ubuntu?
currently my system is powered by ubuntu. I wanted to know how can I convert pdf to JPG or PNG?
Any help will be greatly appreciated. Thanks a lot in advance.
Reply With Quote
#2
Old 31-03-2012
JyotiT JyotiT is offline
Member

Join Date: Aug 2011
Posts: 503
Re: How to convert PDF file to JPG or PNG in ubuntu?
Well you will be able to do the same by using command-line utility. It seems to be part of Imagemagick suite and you will be install the same by using synaptic.
Now in order to convert PDF file to PNG you have to use below mentioned command.
Code:

convert infile.pdf outfile.png

Reply With Quote
#3
Old 31-03-2012
-Deven- -Deven- is offline
Member

Join Date: Aug 2011
Posts: 389
Re: How to convert PDF file to JPG or PNG in ubuntu?
I got when I was trying to number of odd size pdf documents to A4 format.
use pdftk in order to rotate the picture.
Code:

pdftk your_input_file.pdf cat 1-endW output rotated.pdf


after that use imagemagicks in order to convert ps fil and used the -density 300 so that I can have 300dpi resolution.
Code:

convert -density 300 rotated.pdf rotated.ps


finally use ghostscript so that one can get output in A4 format.
Code:

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a4 -sOutputFile=output.pdf rotated.ps

Reply With Quote
#4
Old 03-04-2012
phunsuk phunsuk is offline
Member

Join Date: Jul 2011
Posts: 492
Re: How to convert PDF file to JPG or PNG in ubuntu?
you will be able to open pdf file in evince. Go for print to file and click on page setup and go for pages per side and click on Use 4. Now you will see that new pdf file with 4 pages at every side has been created. Now you can convert the same into png document by using below mentioned command.

Code:

convert 4pages_per_side.pdf 4pages_per_side.png

0 comments:

Post a Comment

Read - Share - Comment

About This Blog

Share and Save

About Author