LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2008, 02:38 PM   #1
DeNayGo
Member
 
Registered: Jun 2005
Location: Aachen, Germany
Distribution: Debian
Posts: 74

Rep: Reputation: 16
Programmatically convert PDF to JPEG


I've been looking for a solution to this for a while now. So far I've been using ImageMagick's convert, and it works in many cases. But there are very many PDF files it can't read (or ghostscript can't read), or reads incorrectly.

Unfortunately I can't be more precise as to the reason why it fails, cause it mostly just breaks up without reason. And if the PDF is too big (filesize or pages, doesn't matter) ImageMagick uses literally gigabytes of memory and I usually kill it...

Basically what I'm looking for is a console application that can read all PDF files out there (which programs like Xpdf seem to be able to do) and convert them to JPEGs (and split them into many small PDFs, too, if possible). Is there anything like that? Or is there some way to force ghostscript to read all files?

TIA
 
Old 03-25-2008, 03:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Not sure whether it will work with YOUR PDFs, but I had good
results with it in the past ... have you looked at pdftk? It
allows all sorts of manipulations on PDF, including splitting
large multi-page ones into individual files per page. That
may help with some of your problems.



Cheers,
Tink
 
Old 03-25-2008, 08:22 PM   #3
angrybanana
Member
 
Registered: Oct 2003
Distribution: Archlinux
Posts: 147

Rep: Reputation: 21
You could try pdfimages from the poppler library, which is based on xpdf. Though if you're problem is with postscript I'm not sure this will help any.
 
Old 03-28-2008, 06:10 AM   #4
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Rep: Reputation: 38
maybe pdftoppm and then conver to jpg.

do man pdftoppm
 
Old 03-28-2008, 06:11 AM   #5
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Rep: Reputation: 38
man ppmtojpeg
 
  


Reply



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
Text to JPEG/PDF Conversion BrianD18 Linux - Software 8 11-03-2007 11:51 AM
jpeg to pdf gbowden Linux - Software 6 12-14-2006 03:50 AM
convert psd to jpeg gabsik Linux - Software 10 09-22-2006 08:59 AM
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM
JPEG to PDF on Linux? hpnadig Linux - Software 5 04-16-2004 12:28 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:05 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
Open Source Consulting | Domain Registration