LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using imagemagick to convert numerous jpg files to single pdf (http://www.linuxquestions.org/questions/linux-software-2/using-imagemagick-to-convert-numerous-jpg-files-to-single-pdf-719029/)

jrtayloriv 04-14-2009 09:18 AM

[solved] Using imagemagick to convert numerous jpg files to single pdf
 
I have a large number of scanned JPG images that I would like to convert into a single PDF file -- each image will be on its own page, and I want the pages to be in a certain order.

What is the command for ImageMagick to take a batch of JPGs and convert them to PDF, and order the pages in a certain way.

Say for example, that I had -- page1.jpg page2.jpg page3.jpg ...

Thanks very much for your help.

--jrtayloriv

(by the way: I am working on writing a Gentoo ebuild for convert2pdf at the moment, but until I get that worked out, I'd like to figure out how to do this using Imagemagick, which is already in the portage tree, and already installed)

zer0x333 04-14-2009 10:09 AM

ImageMagick & PDFTK
 
Hi,

I may be wrong, but I don't think ImageMagick can do that by itself.

I would convert the images as seperate PDF's then use something like pdftk to merge them into one with ordering.

Code:

      Join in1.pdf and in2.pdf into a new PDF, out1.pdf
        pdftk in1.pdf in2.pdf cat output out1.pdf
        or (using handles):
        pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf
        or (using wildcards):
        pdftk *.pdf cat output combined.pdf

Not sure if that helps, but there it is :D

zer0x

jrtayloriv 04-14-2009 10:32 AM

That does help very much. Thank you. I was able to find plenty of info on using imagemagick to convert individual JPGs into individual PDFs, so I know how to do that. I just couldn't find any info on converting a batch of JPGs into a single PDF.

pdftk seems to be what I was looking for. I appreciate the help.

--jrtayloriv

zer0x333 04-14-2009 10:59 AM

Glad to be useful :)

papulia 03-22-2010 10:03 AM

[UBUNTU]How to Covert Multiple Jpegs To one pdf file in UBUNTU/Linux
 
One of the most common qs i see in forums is >>> How to convert multiple jpg files to one one pdf file by one click .

I have got 2 solutions that I consider solve this situation to the best ....

*1.* Install SCRIBUS from synaptic package manager . It can convert jpegs to pdf without any issues .

F Spot Photo Manager can also be used .

*2.* This 2nd step I find much better ....
I have been using it myself for some time now ... and its flaw less ...

A) Install WINE using the terminal . For beginers .... Its a software that can run selected windows applications on a linux destro like ubuntu. Installing is very easy >>>> open synaptic manager and in quick search box type Wine. Once the wine files show in the search mark them for installation.

For details on easy manual for wine installation check here ..
http://www.psychocats.net/ubuntu/wine

B) Now go to the page below .... Its a free software.

http://www.a-pdf.com/faq/how-to-stit...s-into-pdf.htm

Down load and save the software from the link given .

Open the file using wine ( Right click on the file and choose the option open with wine.) The installer will run and the programme will be installed .

And Viola ... Its ready .... Import ur jpg files and merge them all in to 1 pdf file .. Very Useful In Merging Comics together.

So , That all regarding this query .. will post soon when I come across some thing small but Very Useful ..

Plz give ur feedbacks if the solution worked for you .

galaxxy 05-17-2010 03:27 AM

Just use ImageMagick:

Code:

convert *.jpg foo.pdf

Shadow_7 05-17-2010 11:51 AM

or a2ps + ps2pdf

Coffrey 05-03-2013 05:13 AM

thanks a lot zerox
that also helped me :)
ive been trying to get my way around imagemagick, but its hard :(
now i can finally stop using cheap conversion sites
regards
ashley


All times are GMT -5. The time now is 04:03 PM.