ImageQuality is not working for PngViewOptions

This topic is related to the “How to improve image quality in GroupDocs.Annotation” that I opened some days ago. I followed this suggestion to increase the quality of GropDocs.Viewer but it just works for HtmlViewOptions it doesn’t work for PngViewOptions.

Git Repository: GitHub - groupdocs-viewer/GroupDocs.Viewer-for-Java: GroupDocs.Viewer for Java examples, plugins and showcase
Git Branch: master
Git Revision: f75a0b71811fcb93ecdb8f6730cbf3a3f9231abc

@john.mcqueide

Setting image quality is not supported when rendering PDF to PNG. We’ll consider adding support for setting resolution when rendering PDF to PNG in the future version. The feature ID is VIEWERJAVA-2755. Can you please attach the sample file that you are rendering?

Yes, sure. Sorry for taking so long.

1344464123.pdf (655.8 KB)

1344465784.pdf (663.6 KB)

@john.mcqueide

No problem. Thank you for attaching the files!

Hello,

Do you have any updates about this ticket?

@john.mcqueide

There are no updates for this issue at the moment. As soon as we have any new information we’ll let you know.

1 Like

@john.mcqueide

We’re planning to add a setting for changing image quality when rendering PDF to PNG. The setting is going to affect image resolution and will work similarly to resizing the image to smaller dimensions. Please let us know if it will work for you.

1 Like

Yes, I think so. If it has a similar behavior as the HtmlViewOptions it should be enough.

@john.mcqueide

Ok, thank you for the response.

Hello, is there an update on this topic?

@john.mcqueide

This feature is going to be implemented in the next public release of Viewer. The new version is planned to publish this month.

1 Like

Hello!
Changing quality of image saving PDF file as PNG will be available in GroupDocs.Viewer for Java since v22.12

Example of usage:

PngViewOptions viewOptions = new PngViewOptions(resultFile);

try (Viewer viewer = new Viewer(sourcePdfFile)) {
    viewOptions.getPdfOptions().setImageQuality(ImageQuality.HIGH);
    viewer.view(viewOptions);
}