HEre is the conversion code:
try (Converter converter = new Converter(fileName)) {
final ImageConvertOptions options = new ImageConvertOptions();
options.setFormat(FileType.fromExtension("png")); // Set format to PNG
options.setGrayscale(true);
options.setHorizontalResolution(200);
options.setVerticalResolution(200);
converter.convert(new SavePageStream() {
@Override
public OutputStream invoke(int i) {
String fileImgName = i + "-" + UUID.randomUUID() + ".png";
try {
System.err.println("save file: " + fileImgName );
return new FileOutputStream(fileImgName);
} catch (Exception e) {
System.err.println("Could not save file: " + fileImgName + " ex:" + e.getMessage());
return null;
}
}
},
options);
}
This converion is works fine on windows I mean the output of conversion pptx slides to images have good qyality and resolution 200 dpi
The same on linux rocky 9/kali/ centos generate images but ignores DPI configuration it means that the output dpi is always 96 DPI
Any idea how to force convert to high quality 200 dpi images on linus?
Tested versions from
https://mvnrepository.com/artifact/com.groupdocs/groupdocs-conversion/24.12.1
to
https://mvnrepository.com/artifact/com.groupdocs/groupdocs-conversion/24.1
always the same result output images of slides ale low quality and low resolution
Tested java 11,17,21 the same results.