public class ViewInfoOptions extends BaseViewOptions implements IMaxSizeOptions
The ViewInfoOptions class encapsulates additional settings and parameters that can be used to retrieve information about a view in the GroupDocs.Viewer component.
Example usage:
ViewInfoOptions viewInfoOptions = ViewInfoOptions.forPngView(false);
try (Viewer viewer = new Viewer("document.pdf")) {
ViewInfo viewInfo = viewer.getViewInfo(viewInfoOptions);
// Use the viewInfo object for further operations
}
Note: The ViewInfoOptions class implements the IMaxSizeOptions interface to provide additional settings and size constraints for view information retrieval.
| Modifier and Type | Method and Description |
|---|---|
static ViewInfoOptions |
forHtmlView()
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into HTML. |
static ViewInfoOptions |
forHtmlView(boolean renderSinglePage)
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into HTML. |
static ViewInfoOptions |
forJpgView()
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into JPG. |
static ViewInfoOptions |
forJpgView(boolean extractText)
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into JPG. |
static ViewInfoOptions |
forPdfView()
Initializes a new instance of the ViewInfoOptions class to retrieve information about view when rendering into PDF.
|
static ViewInfoOptions |
forPngView()
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into PNG. |
static ViewInfoOptions |
forPngView(boolean extractText)
Initializes a new instance of the
ViewInfoOptions class to retrieve information about the view when rendering into PNG. |
static ViewInfoOptions |
fromHtmlViewOptions(HtmlViewOptions options)
Initializes a new instance of the
ViewInfoOptions class based on the HtmlViewOptions object. |
static ViewInfoOptions |
fromJpgViewOptions(JpgViewOptions options)
Initializes a new instance of the
ViewInfoOptions class based on the JpgViewOptions object. |
static ViewInfoOptions |
fromPdfViewOptions(PdfViewOptions options)
Initializes a new instance of the
ViewInfoOptions class based on a PdfViewOptions object. |
static ViewInfoOptions |
fromPngViewOptions(PngViewOptions options)
Initializes a new instance of the
ViewInfoOptions class based on the PngViewOptions object. |
int |
getHeight()
The height of the output image (in pixels, for rendering to PNG/JPG only).
|
int |
getMaxHeight()
Returns the maximum height of the output image for rendering to PNG/JPG.
|
int |
getMaxWidth()
Returns the maximum width of the output image for rendering to PNG/JPG.
|
int |
getWidth()
The width of the output image (in pixels, for rendering to PNG/JPG only).
|
boolean |
isExtractText()
Indicates whether text extraction is enabled.
|
void |
setExtractText(boolean extractText)
Sets the flag indicating whether text extraction is enabled.
|
void |
setHeight(int height)
The height of the output image (in pixels, for rendering to PNG/JPG only).
|
void |
setMaxHeight(int maxHeight)
Sets the maximum height of an output image (in pixels, for rendering to PNG/JPG only).
|
void |
setMaxWidth(int maxWidth)
Sets the maximum width of an output image (in pixels, for rendering to PNG/JPG only).
|
void |
setWidth(int width)
The width of the output image (in pixels, for rendering to PNG/JPG only).
|
getArchiveOptions, getCadOptions, getDefaultFontName, getEmailOptions, getMailStorageOptions, getOutlookOptions, getPdfOptions, getPresentationOptions, getProjectManagementOptions, getSpreadsheetOptions, getTextOptions, getVisioRenderingOptions, getWebDocumentOptions, getWordProcessingOptions, isCadOptionsInitialized_Internal, isRemoveComments, isRenderComments, isRenderHiddenPages, isRenderNotes, setArchiveOptions, setCadOptions, setDefaultFontName, setEmailOptions, setMailStorageOptions, setOutlookOptions, setPdfOptions, setPresentationOptions, setProjectManagementOptions, setRemoveComments, setRenderComments, setRenderHiddenPages, setRenderNotes, setSpreadsheetOptions, setTextOptions, setVisioRenderingOptions, setWebDocumentOptions, setWordProcessingOptionspublic static ViewInfoOptions forHtmlView()
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML.
ViewInfoOptions class.public static ViewInfoOptions forHtmlView(boolean renderSinglePage)
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into HTML.
Note: By default, HTML content will be rendered on multiple pages.
renderSinglePage - Enables HTML content to be rendered on a single page.ViewInfoOptions class.public static ViewInfoOptions forJpgView()
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG.
ViewInfoOptions class.public static ViewInfoOptions forJpgView(boolean extractText)
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into JPG.
extractText - Enables text extraction.ViewInfoOptions class.public static ViewInfoOptions forPdfView()
Initializes a new instance of the ViewInfoOptions class to retrieve information about view when rendering into PDF.
ViewInfoOptions class.public static ViewInfoOptions forPngView()
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG.
ViewInfoOptions class.public static ViewInfoOptions forPngView(boolean extractText)
Initializes a new instance of the ViewInfoOptions class to retrieve information about the view when rendering into PNG.
extractText - Enables text extraction.ViewInfoOptions class.public static ViewInfoOptions fromHtmlViewOptions(HtmlViewOptions options)
Initializes a new instance of the ViewInfoOptions class based on the HtmlViewOptions object.
options - The HTML view options.ViewInfoOptions class.IllegalArgumentException - Thrown when options is null.HtmlViewOptionspublic static ViewInfoOptions fromJpgViewOptions(JpgViewOptions options)
Initializes a new instance of the ViewInfoOptions class based on the JpgViewOptions object.
options - The JPG view options.ViewInfoOptions class.IllegalArgumentException - Thrown when options is null.JpgViewOptionspublic static ViewInfoOptions fromPdfViewOptions(PdfViewOptions options)
Initializes a new instance of the ViewInfoOptions class based on a PdfViewOptions object.
options - The PDF view options.IllegalArgumentException - Thrown when options is null.public static ViewInfoOptions fromPngViewOptions(PngViewOptions options)
Initializes a new instance of the ViewInfoOptions class based on the PngViewOptions object.
options - The PNG view options.ViewInfoOptions class.IllegalArgumentException - Thrown when options is null.PngViewOptionspublic int getHeight()
The height of the output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the output image height (in pixels). For code example, see the documentation. If you set this property, thepublic int getMaxHeight()
Returns the maximum height of the output image for rendering to PNG/JPG.
Use this property to set the maximum output image height (in pixels). For code example, see the documentation. If you set thegetMaxHeight in interface IMaxSizeOptionspublic int getMaxWidth()
Returns the maximum width of the output image for rendering to PNG/JPG.
Use this property to set the maximum output image width (in pixels). For code example, see the documentation. If you set thegetMaxWidth in interface IMaxSizeOptionspublic int getWidth()
The width of the output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the output image width (in pixels). For code example, see the documentation. If you set this property, thepublic boolean isExtractText()
Indicates whether text extraction is enabled.
Use this property to get the text contained in a source document and its coordinates. Then you can use this data to add a selectable text over the image or to implement a text search in image-based rendering. For code example, see the documentation.public void setExtractText(boolean extractText)
Sets the flag indicating whether text extraction is enabled.
Use this property to get the text contained in a source document and its coordinates. Then you can use this data to add a selectable text over the image or to implement a text search in image-based rendering. For code example, see the documentation.extractText - True to enable text extraction, false to disable.public void setHeight(int height)
The height of the output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the output image height (in pixels). For code example, see the documentation. If you set this property, theheight - The height of the image.public void setMaxHeight(int maxHeight)
Sets the maximum height of an output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the maximum output image height (in pixels). For code example, see the documentation. If you set thesetMaxHeight in interface IMaxSizeOptionsmaxHeight - The maximum height of the output image.public void setMaxWidth(int maxWidth)
Sets the maximum width of an output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the maximum output image width (in pixels). For code example, see the documentation. If you set thesetMaxWidth in interface IMaxSizeOptionsmaxWidth - The maximum width of the output image.public void setWidth(int width)
The width of the output image (in pixels, for rendering to PNG/JPG only).
Use this property to set the output image width (in pixels). For code example, see the documentation. If you set this property, thewidth - The width of the image.Copyright © 2025. All rights reserved.