LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-14-2009, 09:18 AM   #1
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 365
Blog Entries: 1

Rep: Reputation: 44
[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)

Last edited by jrtayloriv; 04-14-2009 at 10:33 AM. Reason: Problem solved
 
Old 04-14-2009, 10:09 AM   #2
zer0x333
Member
 
Registered: Oct 2007
Posts: 31

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

zer0x
 
Old 04-14-2009, 10:32 AM   #3
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 365
Blog Entries: 1

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

Last edited by jrtayloriv; 04-14-2009 at 10:46 AM.
 
Old 04-14-2009, 10:59 AM   #4
zer0x333
Member
 
Registered: Oct 2007
Posts: 31

Rep: Reputation: 16
Glad to be useful
 
Old 03-22-2010, 10:03 AM   #5
papulia
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Rep: Reputation: 1
Thumbs up [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 .
 
Old 05-17-2010, 03:27 AM   #6
galaxxy
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
Just use ImageMagick:

Code:
convert *.jpg foo.pdf
 
Old 05-17-2010, 11:51 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,509

Rep: Reputation: 233Reputation: 233Reputation: 233
or a2ps + ps2pdf
 
Old 05-03-2013, 05:13 AM   #8
Coffrey
LQ Newbie
 
Registered: May 2013
Posts: 2

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


Reply

Tags
batch, conversion, imagemagick, 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
Samba users can't execute some files (pdf/doc/jpg) deathsfriend99 Linux - Server 4 03-02-2009 09:48 AM
LXer: How to convert PDF files to HTML or XML files in openSUSE LXer Syndicated Linux News 0 08-20-2008 08:40 AM
HELP! BASH - Convert filenames from dsc00***.jpg to *.jpg jimmybond01 Programming 9 05-08-2007 06:17 AM
How To Merge multiple files into a single PDF ? kkempter Linux - Software 1 10-28-2005 01:02 PM


All times are GMT -5. The time now is 08:09 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration