Click or drag to resize
Pdf Library for .NET

HtmlToPdfOptionsJpegCompressionLevel Property

Gets or sets the compression level of images in the generated pdf document.

Namespace:  SelectPdf
Assembly:  Select.HtmlToPdf (in Select.HtmlToPdf.dll) Version: 24.1
Syntax
public int JpegCompressionLevel { get; set; }

Property Value

Type: Int32
Remarks
This property can take values between 0 and 100. It has effect only when the JpegCompressionEnabled is set to true. When the JpegCompressionLevel is 0, the compression rate is the lowest and the quality of the images is the best. When the JpegCompressionLevel is 100, the compression rate is the highest and quality of the images in PDF is the worst.

The default JPEG compression level is 10, which should offer a good balance between the compression rate and the quality of the images in pdf.

See Also