LinuxQuestions.org
Help answer threads with 0 replies.
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 10-28-2011, 04:41 AM   #1
sholdon
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
How to convert PDF to jpg?


I have hundreds of multipage pdf documents that I would like to save out as jpg's files.
I know I can convert them individually but if anyone knows a program that could do this for me automatically that would be great
 
Old 10-28-2011, 05:01 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
If you have ImageMagick it's easy as
Code:
convert file.pdf file.jpg
this will create a JPEG for every single page of the original document. If you want to improve the quality, you can try some options, e.g
Code:
convert -colorspace RGB -interlace none -density 300x300 -quality 100 file.pdf file.jpg
To do multiple conversions, you can do a loop:
Code:
for file in *.pdf
do
 convert -colorspace RGB -interlace none -density 300x300 -quality 100 $file ${file/pdf/jpg}
done

Last edited by colucix; 10-28-2011 at 05:02 AM.
 
3 members found this post helpful.
Old 12-05-2011, 01:22 PM   #3
libCog
LQ Newbie
 
Registered: Aug 2011
Posts: 23

Rep: Reputation: Disabled
If these PDFs are simply scans (raster, not vector), then "converting" is not the best approach. In this case, you should simply extract the images from the PDF container using "pdfimages" (it's stock on most distros). It's easy to script something using pdfimages.

If these are vector PDFs, then I don't know what's the best approach.. perhaps ImageMagick.. although I think I recall IM having issues with vector PDFs.
 
1 members found this post helpful.
Old 12-05-2011, 04:56 PM   #4
jefro
LQ Guru
 
Registered: Mar 2008
Posts: 14,902

Rep: Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100Reputation: 2100
http://www.medicalnerds.com/batch-co...free-software/
 
Old 12-05-2011, 11:15 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Do you want to convert every page of a multipage PDF and convert it to an image?
Do these PDFs contain collections of photo's that you want to extract, or are they regular PDFs with text?

The poppler-tools package contains pdf processing programs including the "pdfimages" program.
To convert every page of a pdf to an image, there is the "pdftoppm" program. Can then use ImageMagick's "convert" program to convert the ppm files to jpegs or another image format.
 
1 members found this post helpful.
Old 07-21-2016, 01:17 PM   #6
linuxuser_211
LQ Newbie
 
Registered: Jul 2016
Posts: 1

Rep: Reputation: 0
Re: How to convert PDF to jpg?

if you have so many files to convert, you can either use an open source free library xpdf foolabs.com/xpdf/ to convert the files in batch. otherwise use a free conversion software like pdf-to-jpg-convert.en.softonic.com
 
Old 07-21-2016, 02:13 PM   #7
hydrurga
Senior Member
 
Registered: Nov 2008
Distribution: Linux Mint 18 MATE
Posts: 1,072

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by linuxuser_211 View Post
if you have so many files to convert, you can either use an open source free library xpdf foolabs.com/xpdf/ to convert the files in batch. otherwise use a free conversion software like pdf-to-jpg-convert.en.softonic.com
Welcome to LinuxQuestions.

You do realise that you necroed a thread from 2011 to give this advice, don't you?

In general, that's frowned upon, for various reasons (although I admit that there can on occasion be good reasons for doing so).

On the other hand, we constantly have lots of new and fresh questions asked here on a daily basis. I look forward to you contributing your knowledge and experience to help answer those questions.

Please do introduce yourself in the Introductions section.

By the way, I wouldn't personally touch a Softonic link if you paid me, but that's just me.
 
Old 07-21-2016, 10:30 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Posts: 16,601

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Quote:
By the way, I wouldn't personally touch a Softonic link if you paid me, but that's just me\
nor would i

However converting a pdf to a jpg is already built in

Gimp is installed on 99.999999999999% of installs
or
use the already installed openoffice or Libreoffice or GoOffice

and for bulk conversion of HUNDREDS of pdf's

imagemagick or Gmic or a shell script can do it

Last edited by John VV; 07-21-2016 at 10:32 PM.
 
Old 07-22-2016, 02:36 AM   #9
Michael Uplawski
Member
 
Registered: Dec 2015
Location: Normandy, France
Distribution: Debian stretch/sid
Posts: 299
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by sholdon View Post
I have hundreds of multipage pdf documents that I would like to save out as jpg's files.
I know I can convert them individually but if anyone knows a program that could do this for me automatically that would be great
Look in my blog... HUAAAaahahaaa. Yes just click on the link to the left. Topmost blog-entry.
 
Old 07-23-2016, 01:51 PM   #10
hudsontom220
LQ Newbie
 
Registered: Jul 2016
Location: Grand Rapids Michigan
Distribution: Slackware-14.2
Posts: 11

Rep: Reputation: Disabled
Cool download the converter

the PDF to DOC also changes all the supported Pic formats to both DOC and PDF\
Google " PDF to DOC"
 
Old 07-23-2016, 07:07 PM   #11
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,499

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
I know you asked for pdf to jpg, but if png files will work for you, xpdf provides pdftopng
 
Old 07-24-2016, 03:41 AM   #12
Michael Uplawski
Member
 
Registered: Dec 2015
Location: Normandy, France
Distribution: Debian stretch/sid
Posts: 299
Blog Entries: 10

Rep: Reputation: Disabled
It would be nice to have the OP's feedback on some of our suggestions.

And as I am at it.., why must the image format be Jpeg, in deed? If it is for storage, jpg2000 would be better, and tiffs in compressed archives are fine as they will insure that more details survive the conversion.
 
Old 07-24-2016, 06:31 AM   #13
hydrurga
Senior Member
 
Registered: Nov 2008
Distribution: Linux Mint 18 MATE
Posts: 1,072

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Michael Uplawski View Post
It would be nice to have the OP's feedback on some of our suggestions.

And as I am at it.., why must the image format be Jpeg, in deed? If it is for storage, jpg2000 would be better, and tiffs in compressed archives are fine as they will insure that more details survive the conversion.
The OP posted in 2011 and has a total of 2 posts, so good luck on that.

One possible reason might be to upload images of one or more of a pdf's pages to the web for thumbnail purposes.
 
Old 07-24-2016, 06:39 AM   #14
Michael Uplawski
Member
 
Registered: Dec 2015
Location: Normandy, France
Distribution: Debian stretch/sid
Posts: 299
Blog Entries: 10

Rep: Reputation: Disabled
There is a lesson here, somewhere... Not the one where it sais: Look out for outdated threads, don't excavate corpses. But rather something that should be applied to just any discussion that I want to participate in.

Hit me again, if it continues.
 
Old 07-24-2016, 06:51 AM   #15
hydrurga
Senior Member
 
Registered: Nov 2008
Distribution: Linux Mint 18 MATE
Posts: 1,072

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Michael Uplawski View Post
There is a lesson here, somewhere... Not the one where it sais: Look out for outdated threads, don't excavate corpses. But rather something that should be applied to just any discussion that I want to participate in.

Hit me again, if it continues.
Not at all. I'd never heard of jpg2000 for example, now I have. You also encouraged me to think about possible use cases. So, merci!
 
  


Reply

Tags
convert, document, jpg, pdf


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
convert multiple jpg files into pdf Brocolli Linux - Software 5 05-08-2013 09:43 AM
Using imagemagick to convert numerous jpg files to single pdf jrtayloriv Linux - Software 7 05-03-2013 05:13 AM
[SOLVED] Using convert from imagemagick package to convert multiple jpg files janis_169 Linux - Newbie 5 07-18-2010 04:22 PM
HELP! BASH - Convert filenames from dsc00***.jpg to *.jpg jimmybond01 Programming 9 05-08-2007 06:17 AM
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM


All times are GMT -5. The time now is 02:34 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