HowTo convert jpg to pdf

| | Comments (0) | TrackBacks (0)

Recently I had to convert some scans to pdf. Unfortunately the scaned documents were only available as jpg, so I was looking for a way to convert these (huge) images into one pdf. First I thought ok, let’s use convert (which is part of ImageMagick, however it turned out that the output pdf got either bloated (700kbyte -> 11Mbyte!!!) or had poor quality when the images where previously scaled down.

After trying heaps of tools with unsatisfying results, I finally found a package called leptonica-progs, which provides a tool called converttops to convert images directly into ps files while preserving good quality and holding down the file size.

Install leptonica-progs:

aptitude install leptonica-progs

preprocess images to reduce filesize:

convert input.jpg - resize 50% output.jpg

convert jpg to ps:

/usr/bin/leptonica/converttops input.jpg output.ps

convert ps to pdf:

ps2pdf *ps

join the pdf files into a single one:

pdfjoin *pdf

0 TrackBacks

Listed below are links to blogs that reference this entry: HowTo convert jpg to pdf.

TrackBack URL for this entry: http://www.rommel.stw.uni-erlangen.de/~ritschi/cgi-bin/mt/mt-tb.cgi/32

Leave a comment

About this Entry

This page contains a single entry by ritschi published on July 13, 2008 5:02 PM.

iRed Lite layer for Adobe Reader was the previous entry in this blog.

minimal boot system for flash device (BusyBox + uClibc) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.