Thursday 7 February 2013

Converting multiple images into one PDF on Linux

The most simple way to do this is to use the command line
convert *.png result.pdf
This will create a single pdf and append all the png imges in the directory to the file.

4 comments:

  1. What this does is use the ‘convert’ command (part of the Imagemagick package), and take all images that start with Workspace (the asterisk means that any character after “Workspace” is allowed), and place them alphabetically into a file named Workspace.pdf, into the containing folder.

    ReplyDelete
  2. It can convert protected and encrypted files (provided that you know the password), and you can specify which pages to convert. Note that you won't be able to convert PDF files which are made from images, as pdftotext does not have OCR capabilities. Luckily, there are many OCR tools to choose from. Some are free, others cost a fortune. Personally, I recommend OnlineOCR because it supports multiple languages and in most cases produces excellent results.You're allergic to command-line? Don't panic - ImageMagick has a nice graphical frontend called Converseen .

    ReplyDelete
  3. This loops through all the .jpg images in the directory and converts them to a PDF file of the same name. Once that is done they are all combined into FINAL_NAME.pdf by pdftk , a handy PDF utility. The temp dir business is there to make the temp PDF file removal easier.

    ReplyDelete
  4. In this tutorial we’ll see how to convert multiple images to PDF with gscan2pdf. Though the tutorial is performed in Ubuntu 13.04, it should be valid for earlier or newer Ubuntu versions as well as other Linux distributions.

    ReplyDelete