Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Applications

Convert Images to PDF

Submitted by on July 18, 2008 – 12:26 amNo Comment
Convert Images to PDF

Converting sets of images into multi-page PDF files makes it easier to organize and share them. All you need for the conversion is the free ImageMagick that will run on your Windows, Linux, MacOS and many other operating systems. If you are running a recent version of Linux, chances are that ImageMagick is already installed on your computer (just type “which convert” to check).

The basic syntax for the conversion is very simple:

convert *.jpg filename.pdf

This command will look for all *.jpg files in the current directory and it will add them to a single PDF file.

In the following example we have a bunch of folders in /home/user/photos. Each folder contains many JPEG files. You want to convert each folder of these images into a PDF file with the same name as the folder:

ls | fgrep -v . | while read FOLDER
do
     nice -n +10 convert ./${FOLDER}/*.jpg ./${FOLDER}.pdf
done

Unfortunately, when performing batch file conversions, ImageMagick uses lots of RAM and CPU. To keep ImageMagick from taking over your CPU, we use the “nice” command. The more images you have in a folder, the more RAM/swap ImageMagick will use. It is possible that your system may run out of swap space. To add extra swap space on the fly, do the following:

dd if=/dev/zero of=/swapfile bs=1024 count=65536
mkswap /swapfile
swapon /swapfile

Running “top” or “free” will show you how much swap space your system has. It is advisable to put the extra swap space on a secondary disk, so not to slow down the system disk with swap I/O. ImageMagick is a bit sluggish and resource-hungry when it comes to working with PDF files. Adobe Acrobat is much faster and more efficient. But then again, ImageMagick doesn’t cost you three hundred bucks and it produces fully-compatible PDF files.

Popularity: 7% [?]

Related posts:

  1. Increase swap space
  2. Convert MySQL table to CSV file
  3. Working with ISO images on Solaris

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.