Set Jpeg quality

When rendering documents and files to JPG with GroupDocs.Viewer you can adjust quality of the output images by setting setQuality() property of JpgViewOptions class. The supported values range of setQuality() is from 1 to 100. Default value is 90.

This example demonstrates how to adjust quality of the output JPG image.

try (Viewer viewer = new Viewer("sample.docx")) {
    JpgViewOptions viewOptions = new JpgViewOptions();
    viewOptions.setQuality((byte) 50);

    viewer.view(viewOptions);
}