public enum ImageQuality extends Enum<ImageQuality>
The ImageQuality enum represents the quality of images in the output HTML contained by the PDF documents in the GroupDocs.Viewer component. It provides different levels of image quality that can be used to control the rendering and compression of images in the generated HTML output.
Example usage:
HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources();
PdfOptions pdfOptions = htmlViewOptions.getPdfOptions();
pdfOptions.setImageQuality(ImageQuality.HIGH);
try (Viewer viewer = new Viewer("document.pdf")) {
viewer.view(htmlViewOptions);
// Use the viewer object for further operations
}
HtmlViewOptions,
Viewer| Enum Constant and Description |
|---|
HIGH
The best quality but slow performance.
|
LOW
The acceptable quality and best performance.
|
MEDIUM
Better quality and slower performance.
|
| Modifier and Type | Method and Description |
|---|---|
static ImageQuality |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ImageQuality[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ImageQuality HIGH
The best quality but slow performance. This setting prioritizes image quality over rendering speed.
public static final ImageQuality LOW
The acceptable quality and best performance. This setting prioritizes rendering speed over image quality.
public static final ImageQuality MEDIUM
Better quality and slower performance. This setting provides a balance between image quality and rendering speed.
public static ImageQuality valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static ImageQuality[] values()
for (ImageQuality c : ImageQuality.values()) System.out.println(c);
Copyright © 2025. All rights reserved.