Click or drag to resize

Jpeg Compression of Images in PDF

The converter automatically compresses the images generated in PDF using the JPEG compression algorithm to highly reduce the size of the generated PDF document. The JPEG compression reduces the quality of the images. When the JPEG compression level is increased the quality of the images in the PDF decreases.

The property JpegCompressionLevel defines the current level used for JPEG compression on a scale from 0 to 100. When the compression level is 0 the compression is the worst and the image quality is the best. The default JPEG compression level used by the converter is 10 which offers a good balance between the images quality and the size of the generated PDF document.

If you want to obtain the best image quality it is possible to completely disable the JPEG compression of the images by setting the JpegCompressionEnabled to false.

Sample code below:

pdfConverter.PdfDocumentOptions.JpegCompressionEnabled = true;
pdfConverter.PdfDocumentOptions.JpegCompressionLevel = 20;