LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 04-14-2009, 10:18 AM   #1
jrtayloriv
Member
 
Registered: Jun 2004
Location: Johnson City, NY
Distribution: Gentoo
Posts: 302
Thanked: 11
[solved] Using imagemagick to convert numerous jpg files to single pdf


[Log in to get rid of this advertisement]
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 11:33 AM.. Reason: Problem solved
jrtayloriv is offline  
Tag This Post , , , ,
Reply With Quote
Old 04-14-2009, 11:09 AM   #2
zer0x333
Member
 
Registered: Oct 2007
Posts: 31
Thanked: 1
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
zer0x333 is offline     Reply With Quote
Thanked by:
Old 04-14-2009, 11:32 AM   #3
jrtayloriv
Member
 
Registered: Jun 2004
Location: Johnson City, NY
Distribution: Gentoo
Posts: 302
Thanked: 11

Original Poster
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 11:46 AM..
jrtayloriv is offline     Reply With Quote
Old 04-14-2009, 11:59 AM   #4
zer0x333
Member
 
Registered: Oct 2007
Posts: 31
Thanked: 1
Glad to be useful
zer0x333 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 07:45 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration