We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

JPEG quality is always 75 on setImageResample on linux


Im trying to save excel document as a pdf file with the following code.
On the windows pc the code works as intended, but on linux os, the jpeg quality parameter seems to be ignored and is always fixed as 75.
Also the image resample fuction seems to resize all the images as a square size image.
Are there any dependent libraries or other requirements I need to install on the linux os?

	PdfSaveOptions pdfSaveOptions = null;
	try {
		int desiredPPI = 96;
		int jpegQuality = 65;
		pdfSaveOptions = new PdfSaveOptions();
		pdfSaveOptions.setImageResample(desiredPPI, jpegQuality);
	} catch (Exception e) {
	try {
		workbook.save("temp.pdf", pdfSaveOptions);
	} catch (Exception e) {

Could you please share input file and output PDF files created on windows as well as on linux. We will analyze it and provide our feedback accordingly.

20200518_samples.zip (1.1 MB)

Here are some sample files.
Thanks in advance.

We have logged the issue as “CELLSJAVA-43185” in our database for investigations. Once, we will have some news for you, we will update you in this topic.

Any updates?

This is to inform you that we have fixed your issue and hopefully you will be getting the fix in the next few days (2-3 days or so) after we have performed QA and incorporated other enhancements and fixes. Keep in touch.

1 Like


Please try our latest version/fix: Aspose.Cells for Java v20.5.1 (attached)
aspose-cells-20.5.1-java.zip (7.1 MB)

Your issue should be fixed in it.

Let us know your feedback.

1 Like


Thanks for the files.
I have try the new module and confirmed that the issue is almost fixed.
But one thing I have noticed is that, most of the images are converted to jpeg with the set quality value,
but few of the jpeg images have quality value of 100.
Not all jpeg images are converted to the set quality value?


Could you please share sample input file and output files. Also paste the sample code (runnable) that you are using and some screenshots to highlight the issue. We will evaluate your issue soon.

Hi, @Amjad_Sahi

After further testing, it seems that images that are already in jpeg format are not converted?
The excel file I used for testing had few of jpeg images, and after converting those images to png format, all the output images had been converted to the set quality value jpeg images.
Thanks for the fix!
When will it be released?

We only publish official releases on Nuget/maven repos. The hotfix, i.e., Aspose.Cells for Java v20.5.1 is fully tested and includes all the features (full fledged) and previous fixes and enhancements. However, if you still want the version to be uploaded onto Nuget/maven, then you have to wait for our next official release of the product. We will publish our next official release, i.e., Aspose.Cells for Java v20.6 (which will also include your fix) in the third week of June, 2020.


Since we are not in hurry, we’ll wait for the maven release.

We will let you know soon once it is released.

The issues you have found earlier (filed as CELLSJAVA-43185) have been fixed in Aspose.Cells for Java v20.6. This message was posted using Bugs notification tool by ahsaniqbalsidiqui