I recently needed to get some large format documents scanned. However the DTP shop kind of messed up the scan order of the documents. So here I was, left with a series of images scanned into PDF files with no real way to edit them into the right order (short of buying a PDF editor like Acrobat). Luckily Ubuntu came with a variety of available free tools to edit PDF files. The one I ended up using was something called PDF Chain. PDF Chain lets you do a variety of operations on PDF files, including merging, splitting etc. So I used PDF Chain to split all the PDF files into individual pages. Then I opened each individual page in GIMP and exported it to PNG, after correcting some scan errors. But then I hit a problem. How do I convert the newly ordered PNG files into PDF files? Well this handy hint helped saved the day. Seems you can convert a set of image files into a PDF using the convert command in Ubuntu. Here is how it works:
- Put the images you want to convert in some location. The convert command will take into account alphabetical order into account while creating pages. So keep this mind when you want the pages in a specific order.
- Fire up terminal from “Applications > Accessories”
- Navigate to the folder or location with your images so that your working directory is that location
- Then for some magic use the following:
convert *.png myPDF.pdf
That’s it !! You should now have a shiny new PDF named myPDF in the location you saved the images in. The original tutorial seems to indicate that this will only work on the Desktop, but rest assured that this works in any location. Sure saved me a ton of time 🙂