Isn't djvu supposed to be smaller than pdf?

0

I convert a pdf file to a djvu file by pdf2djvu with default options. The generated djvu file (6.6MB) is slightly larger than the original pdf file (6.4MB).

  1. Isn't djvu file supposed to be smaller than pdf file? Why is it not the case here?
  2. Are there ways to make a djvu file smaller after conversion without losing important information?

Thanks and regards!

Tim

Posted 2011-06-09T15:38:32.857

Reputation: 12 647

Answers

2

1) djvu bigger than PDF.

As I understand it, djvu is "an image compression technology". PDF is a portable document format. PDF can store text as character strings and the viewer can render those strings using external or embedded fonts. PDF can include compressed bitmaps of scanned text but that isn't the only way it can store text.

If you take a PDF where the text is strings+fonts and convert it to djvu, maybe (under some circumstances) the strings have to be rasterised - thereby increasing the size of data.

If you can provide a small example PDF that exhibits the behaviour, people may be able to explain in more detail.

2) Lossless compression

There are many ways to make things smaller without losing information. some compression algorithms are more efficient than others for certain types of data.

RedGrittyBrick

Posted 2011-06-09T15:38:32.857

Reputation: 70 632

1

One reason for the file size might be that the converter categorized many things as a background layer ( see implementation details).

Do you have any graphics in the document?

kyrisu

Posted 2011-06-09T15:38:32.857

Reputation: 1 405

Thanks! (1) Are things bigger in the background layer than in the foregroud layer? Is it because background layer is raster image and foreground layer is vector image? (2) How can the djvu file be smaller after conversion without losing information? – Tim – 2011-06-09T16:09:36.970