Tag Archives: convert

How to convert .deb packages to .rpm packages and vice versa

Two mostly used Linux distributions are Ubuntu and the other, Fedora. Ubuntu uses .deb packages for installation while Fedora uses packages with .rpm extension. Problem arises when a person using Fedora gets a .deb package or when a person who uses Ubuntu gets a .rpm package. Here’s a simple way to convert them between .rpm and .deb. The solution is the ‘alien’ command. If you don’t have it, use

sudo apt-get install alien

will install alien on to your Ubuntu machine.

Now to convert rpm to debian use

alien rpm-package.rpm

where rpm-package.rpm is your rpm file. A .deb file with same name will be created.

And to convert .deb to .rpm use

alien -r deb-package.deb

where deb-package.deb is your .deb file. A .rpm file with the same name but .rpm extension will be generated.

The same command can be used to convert many other formats. To know more just use the man pages of your Ubuntu machine.

PS: You may want to use sudo.

How to convert PDF documents to JPG/PNG files in Ubuntu

PDFs are so famous that every document that we download now from the net are in pdf formats. PDF readers are omnipresent that even most of the phones now come with. Whenever I have some document to send through mail I just send it as a pdf document. But there are times when you may want to put a pdf document on a website. The simplest way is to convert the pdf file into jpg/png file which can be easily uploaded to a website. Here’s a simple way that converts pdf document to jpeg/png image files in less than 2 seconds.

You need to install imagemagick. On ubuntu, you can do it by typing this in your terminal.

sudo apt-get install imagemagick

Then its just a cake’s walk. Execute the following in terminal.

To convert it to jpg image -

convert example.pdf example.jpeg

and if you want to convert it to png -

convert example.pdf example.png

If there are multiple pages in your pdf document then the files will automatically renamed to file-0.jpg file-1.jpg file2-jpg and so on.

Hope that comes in handy next time you want to put a pdf file on your website.