Rank: Newbie Groups: Member
Joined: 9/8/2017 Posts: 2
|
Hi,
I am using the latest EO.pdf (18.1.75.0). The previous version being used was 17.2.43.0. I noticed in the change log, for version 18.0.9, it says, "Added support for HtmlToPdfOptions.JpegQualityLevel to be set to negative value to skip JPEG compression for images".
I have set JpegQualityLevel to -1 (also tried -2) and it seems to be the same as setting the quality to 100. The original files are png images. Is this expected behavior? Jpegs, by nature, are not the best at representing simplistic images (such as ASP.net charts), but is there anything that can be done to get a better png-to-jpeg conversion?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Setting JpegQualityLevel to -1 does not automatically improve image quality. What it does is to skip JPEG compression. The images are stored in bitmap in memory (no matter what the source format is, it is decoded into a bitmap first), when it is rendered to a PDF file, by default it will go through a JPEG encoder to save space. JpegQualityLevel is one of key parameter for this step. If you set to -1, then it is completely skipped and usually results in a larger file.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 9/8/2017 Posts: 2
|
Thanks!
|