Conversions..! ^_^


Have you ever thought to convert images to pdfs or to some other file format?
Don't get shocked, it is possible. :)
This is done with the help of Software called 'Imagemagick'.


Imagemagick is a free and open source software to create,edit and convert digital images of various formats , edit bitmap image files.You can even convert pdf file to image file format like jpg,png.

Installing Imagemagick in Linux:

sudo apt-get install imagemagick

Image File formats are :

Raster formats

JPEG/JFIF
JPEG 2000
Exif
TIFF
RAW
GIF
BMP
PNG
PPM, PGM, PBM, and PNM
WEBP
HDR Raster formats
Other raster formats
Conversion of image file format(eg : .jpg) to pdf

go to the directory containing file and use the following command:

convert image.jpg doc.pdf

the command converts image.pdf to a document named doc.pdf in the same directory.

Conversion of ODT(in linux) or DOC (in windows) to pdf

For ODT TO pdf:

You can do it in Libre writer ,Write what you want to write,and there is an otion in Standard Tool Bar of 'Export directly as pdf',click on that and your odt will be converted to pdf.

Now the problem lies in what if we have to convert a bunch of images to one pdf file?
For that also we have a solution ^_^
Put all the images in one directory(folder).Go to that directory(folder) by following command :
cd Directory_name

Then apply this command :

convert * output.pdf
where output is the name of your pdf file. If we have to convert pdf to image, then we can do it through command :
Then go to directory having pdf by command :(eg Pictures has pdf)

$ cd Pictures
Then convert it into image by following command :
$ convert abc.pdf def.jpg

To convert pdf to text :

First you have to install poppler by command :

$ sudo apt-get install poppler-utils

and then go to directory having pdf by command :(eg Pictures has pdf)
and run the command to convert to text

convert old.pdf new.txt


Conversion of pdf to html
go to directory having pdf by command :(eg Pictures has pdf)
Then run the command :
pdftohtml a.pdf ak.html

No comments:

Post a Comment

SAY HELLO!!