LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-28-2003, 09:01 AM   #1
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Rep: Reputation: 15
PDF to PNG converter


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.

 
Old 04-28-2003, 02:13 PM   #2
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
u can convert pdf to ps and then to png with gimp but i am not sure just an idea
 
Old 04-28-2003, 02:31 PM   #3
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Original Poster
Rep: Reputation: 15
well, i have found a solution, convert tool from ImageMagick can do this, so i used it and it works great !
 
Old 04-30-2003, 09:01 AM   #4
mtb
Member
 
Registered: Nov 2002
Location: Italy
Distribution: Linux Mint 17 Xfce
Posts: 286

Rep: Reputation: 30
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 !
 
Old 05-02-2003, 04:22 AM   #5
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Original Poster
Rep: Reputation: 15
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.
 
Old 05-02-2003, 02:12 PM   #6
mtb
Member
 
Registered: Nov 2002
Location: Italy
Distribution: Linux Mint 17 Xfce
Posts: 286

Rep: Reputation: 30
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
 
Old 05-03-2003, 05:16 AM   #7
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Original Poster
Rep: Reputation: 15
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
 
Old 05-03-2003, 10:47 AM   #8
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Original Poster
Rep: Reputation: 15
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

?
 
Old 05-03-2003, 12:12 PM   #9
mtb
Member
 
Registered: Nov 2002
Location: Italy
Distribution: Linux Mint 17 Xfce
Posts: 286

Rep: Reputation: 30
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

?
 
Old 05-03-2003, 12:33 PM   #10
Kostko
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 57

Original Poster
Rep: Reputation: 15
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 ?
 
Old 05-05-2003, 06:23 AM   #11
mtb
Member
 
Registered: Nov 2002
Location: Italy
Distribution: Linux Mint 17 Xfce
Posts: 286

Rep: Reputation: 30
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 ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pdf converter program bartgymnast Linux - Software 24 03-24-2015 11:10 PM
PDF to DOC Converter? vivek.sonny.abraham Linux - Software 20 11-30-2011 03:36 PM
Pdf Converter free Software James_dean Linux - Software 4 10-14-2005 12:58 AM
CMD line tool for PDF -> HTML or JPG/PNG/GIF ilhbutshm Linux - Software 5 10-23-2004 04:18 AM
Linux RedHat 9.0 PDF to Word converter lamby Linux - Newbie 2 06-22-2004 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration