LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to convert PDF to jpg? (https://www.linuxquestions.org/questions/linux-software-2/how-to-convert-pdf-to-jpg-910611/)

sholdon 10-28-2011 04:41 AM

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

colucix 10-28-2011 05:01 AM

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


libCog 12-05-2011 01:22 PM

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.

jefro 12-05-2011 04:56 PM

http://www.medicalnerds.com/batch-co...free-software/

jschiwal 12-05-2011 11:15 PM

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.

linuxuser_211 07-21-2016 01:17 PM

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

hydrurga 07-21-2016 02:13 PM

Quote:

Originally Posted by linuxuser_211 (Post 5579476)
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. ;)

John VV 07-21-2016 10:30 PM

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

Michael Uplawski 07-22-2016 02:36 AM

Quote:

Originally Posted by sholdon (Post 4510476)
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.

hudsontom220 07-23-2016 01:51 PM

download the converter
 
the PDF to DOC also changes all the supported Pic formats to both DOC and PDF\
Google " PDF to DOC"

RockDoctor 07-23-2016 07:07 PM

I know you asked for pdf to jpg, but if png files will work for you, xpdf provides pdftopng

Michael Uplawski 07-24-2016 03:41 AM

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.

hydrurga 07-24-2016 06:31 AM

Quote:

Originally Posted by Michael Uplawski (Post 5580491)
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.

Michael Uplawski 07-24-2016 06:39 AM

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.

hydrurga 07-24-2016 06:51 AM

Quote:

Originally Posted by Michael Uplawski (Post 5580531)
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!


All times are GMT -5. The time now is 03:43 AM.