Quality loss during conversion between pdf and djvu

3

1

  1. Is there some quality loss during conversion between pdf and djvu?

    For example, when using djvu2pdf and pdf2djvu among other applications.

  2. If yes, how can the quality be preserved as much as possible during conversion?

Thanks!

Tim

Posted 2012-05-23T14:48:36.690

Reputation: 12 647

Answers

3

First Question:

Is there some quality loss during conversion between pdf and djvu? For example, when using djvu2pdf and pdf2djvu among other applications?

Yes, there is, for several reasons:

1- djvu is a raster format while PDF is a vector format.
zooming on raster graphics and a vector graphics

2- PDf can also contain raster images inside, but even in this scenario, both formats (PDF and djvu) use different compression algorithms, djvu uses JB2 and PDF can use almost everything else but not JB2. Most of these compression algorithms are lossy, so when you go from one format to the other all images inside must be decompressed and recompressed again, lossing information in the process.


Second Question:

If yes, how can the quality be preserved as much as possible during conversion?

This depends on the direction of the conversion, if you are going from vector-based PDFs to djvu, you could try increasing the resolution of your output file. If you are going from djvu to PDF, and your files are monochromatic, you could try using some of the lossless compressions available in PDF (like lossless JBIG2 for example) to prevent the images from lossing quality.

yms

Posted 2012-05-23T14:48:36.690

Reputation: 708

Thanks! So are you saying djvu does not use vector graphics? – Tim – 2012-06-07T21:00:15.943

No, it was designed for storing scanned images, it uses an excelent compression algorithm for this (JB2), and it can associate text to specific portions of the image (for ocr-enabled scans), but it does not use vector graphics. – yms – 2012-06-08T13:08:10.987

Take a look at this post, you may find it useful.

– yms – 2012-06-08T13:08:34.247