I have been trying to use the OptimizationOptions class to set the image quality in our PDF documents by using the setMaxResolution(int value). I have also tried using setImageQuality(int value) method. The use of setImageQuality certainly works but I can’t seem to get any effect using setMaxResolution.
The code sample is something like;
com.aspose.pdf.Document pdfDoc = new com.aspose.pdf.Document(“sample_document.pdf”);
OptimizationOptions optOptions = new OptimizationOptions();
optOptions.setMaxResoultion(72);
pdfDoc.optimizeResources(optOptions);
pdfDoc.save(“maxRes_sample_document.pdf”);
But it seems no matter what value I use the quality of the image (visually) and the size of the PDF doesn’t change. - I think I’m missing something?
Would you please share source and generated files with us so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.PDF for Java 19.3.
We have been able to notice that change in values does not make any difference. Therefore, a ticket with ID PDFJAVA-38504 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.