Open Source Hacking


If you need to send PDF documents as email attachments but your files are very big, you probably tried to compress them. But classic compression methods are not efficient on PDF files.

In fact, there is a technique called MRC: Mixed Raster Content (that I will explain in detail at a later date) that proved to be very efficient in compressing PDF files.

In this tutorial, I will not really explain how to compress PDF files using MRC but rather how to convert PDF files to the DjVu format.

DjVu is a free file format with no restrictions similair to PDF but with higher compression, since it uses the MRC technique.

DjVu logo

1- Install pdf2djvu (you can find it here or using a terminal in ubuntu/debian:

sudo apt-get install pdf2djvu 

2- open a terminal and enter this command:

pdf2djvu yourPDFfile -o theOutputfile 

where yourPDFfile is the file that you want to compress and theOutputfile is the output file :p

That’s it!

I tried for example to compress a PDF magazine and its size went down from 35Mb to 5Mb.

  1. madmed88 posted this

blog comments powered by Disqus