Thursday, October 06, 2011

Convert Images to a single PDF

Converting images to PDF on the command line is a piece of cake on Ubuntu. Program 'convert' can be used to convert a bunch of images to a single PDF file. Program convert can be installed by installing the package imagemagick. This in turn ,can be done simply by issuing the command :
                                                      sudo apt-get install imagemagick

Suppose you have a number of images that has to be converted in to  a single PDF, then :
Step 1 :- Create a new directory and copy all the images to a single directory
Step 2 :- Go to the command line and change directory to the new directory
Step 3 :- Issue the command convert * example.pdf . This will convert all the files in the current directory to a single PDF file.

Converting PDF files to text files  is also easy. Command pdftotext can be used to convert PDF files to text files. Thus the  command pdftotext example.pdf example.txt  will create text version of example.pdf. In most cases pdftotext is pre installed on an Ubuntu OS.

No comments:

Post a Comment