Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
 |
04-28-2003, 09:01 AM
|
#1
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
PDF to PNG converter
[ Log in to get rid of this advertisement]
Does a program for converting PDF files to PNG exist for linux ? I prefer one that can be used in a console, so i can use it in a script.

|
|
|
|
04-28-2003, 02:13 PM
|
#2
|
|
Guru
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398
|
u can convert pdf to ps and then to png with gimp but i am not sure just an idea
|
|
|
|
04-28-2003, 02:31 PM
|
#3
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
well, i have found a solution, convert tool from ImageMagick can do this, so i used it and it works great !
|
|
|
|
04-30-2003, 09:01 AM
|
#4
|
|
Member
Registered: Nov 2002
Location: Italy
Distribution: Debian Etch
Posts: 245
|
Also with the netpbm package.
1st) pdf2ps
2nd) pstoppm
3rd) ppmtopng -compression 9
This way is usually faster [ imagemagick is very very slow, and for this way you can create a script ]
Quote:
Originally posted by Kostko
well, i have found a solution, convert tool from ImageMagick can do this, so i used it and it works great !
|
|
|
|
|
05-02-2003, 04:22 AM
|
#5
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
Quote:
Originally posted by mtb
Also with the netpbm package.
1st) pdf2ps
2nd) pstoppm
3rd) ppmtopng -compression 9
This way is usually faster [ imagemagick is very very slow, and for this way you can create a script ]
|
so where can i get pstoppm and ppmtopng ? because i have netpbm package installed (in debian woody) but i don't have these commands.
---- EDIT ----
is it possible that it is pnm instead of ppm ? well it works, but is there a way to set the resolution (in dpi), because current results are pretty crappy
Last edited by Kostko : 05-02-2003 at 04:25 AM.
|
|
|
|
05-02-2003, 02:12 PM
|
#6
|
|
Member
Registered: Nov 2002
Location: Italy
Distribution: Debian Etch
Posts: 245
|
Yes, excuse me it's pnm ( for what i understand ppm it's the same of pnm with a different name, even if i'm not sure - but i've wrote some image filters and they work fine on both ).
For the res i'll check ( windows now, crap modem ), but i think there is some option ( like in bmv, for this viewer is -r300 (eg.) where 300 is the # of dots per inch ) to modify the dpi.
Quote:
Originally posted by Kostko
so where can i get pstoppm and ppmtopng ? because i have netpbm package installed (in debian woody) but i don't have these commands.
---- EDIT ----
is it possible that it is pnm instead of ppm ? well it works, but is there a way to set the resolution (in dpi), because current results are pretty crappy
|
|
|
|
|
05-03-2003, 05:16 AM
|
#7
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
well, i hope that this is really faster, because i need to convert about 108000 pdf files to png and imagemagick is slow (10 sec per file) :P
|
|
|
|
05-03-2003, 10:47 AM
|
#8
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
ok, i have tried with:
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -r300-sOutputFile=out.png in.pdf
and it sort of works, but the width and height of the pict is too big. is it possible to get the same output as if i do:
convert -density 300x300 -resize 1000x1000 in.pdf out.png
?
|
|
|
|
05-03-2003, 12:12 PM
|
#9
|
|
Member
Registered: Nov 2002
Location: Italy
Distribution: Debian Etch
Posts: 245
|
I don't know. I have tried with:
pstopnm -xsize 1024 ( for example ) and you obtain a quite small file.
Quote:
Originally posted by Kostko
ok, i have tried with:
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -r300-sOutputFile=out.png in.pdf
and it sort of works, but the width and height of the pict is too big. is it possible to get the same output as if i do:
convert -density 300x300 -resize 1000x1000 in.pdf out.png
?
|
|
|
|
|
05-03-2003, 12:33 PM
|
#10
|
|
Member
Registered: Aug 2002
Distribution: Debian
Posts: 57
|
well, still the bast quality and small png file is if i use imagemagick, but it takes about 10 seconds to process a single pdf file and i need to convert a huge amount of files and now it would take me about 2 weeks to complete the whole stuff on a 2ghz athlon. so is this the only choice ?
|
|
|
|
05-05-2003, 06:23 AM
|
#11
|
|
Member
Registered: Nov 2002
Location: Italy
Distribution: Debian Etch
Posts: 245
|
I don't know what else i can suggest.
Maybe xnview [ a friend of mine told me something about this software ] - or irfan view for win?
Quote:
Originally posted by Kostko
well, still the bast quality and small png file is if i use imagemagick, but it takes about 10 seconds to process a single pdf file and i need to convert a huge amount of files and now it would take me about 2 weeks to complete the whole stuff on a 2ghz athlon. so is this the only choice ?
|
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:47 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
LQ Podcast
LQ Radio
|
|