public class ViewerSettings extends Object
The ViewerSettings class provides options and properties to customize the behavior of the GroupDocs.Viewer component during the document rendering process. You can use this class to specify various settings, such as logger, custom cache implementation, and more.
Example usage:
final ViewerSettings viewerSettings = new ViewerSettings();
viewerSettings.setLogger(new ConsoleLogger(false, true));
try (Viewer viewer = new Viewer("source.pdf", viewerSettings)) {
// Document processing
}
Viewer| Constructor and Description |
|---|
ViewerSettings()
Initializes a new instance of the
ViewerSettings class. |
ViewerSettings(Cache cache)
Initializes a new instance of the
ViewerSettings class. |
ViewerSettings(Cache cache,
com.groupdocs.foundation.logging.ILogger logger)
Initializes a new instance of the
ViewerSettings class. |
ViewerSettings(com.groupdocs.foundation.logging.ILogger logger)
Initializes a new instance of the
ViewerSettings class. |
| Modifier and Type | Method and Description |
|---|---|
Cache |
getCache()
Gets the cache implementation used for storing rendering results.
|
com.groupdocs.foundation.logging.ILogger |
getLogger()
Gets the logger implementation used for logging (Errors, Warnings, Traces).
|
void |
setCache(Cache cache)
Sets the cache implementation used for storing rendering results.
|
void |
setLogger(com.groupdocs.foundation.logging.ILogger logger)
Sets the logger implementation used for logging (Errors, Warnings, Traces).
|
public ViewerSettings()
Initializes a new instance of the ViewerSettings class.
public ViewerSettings(Cache cache)
Initializes a new instance of the ViewerSettings class.
cache - The cache.Cachepublic ViewerSettings(Cache cache, com.groupdocs.foundation.logging.ILogger logger)
Initializes a new instance of the ViewerSettings class.
cache - The cache.logger - The logger.Cache,
com.groupdocs.viewer.logging.ILoggerpublic ViewerSettings(com.groupdocs.foundation.logging.ILogger logger)
Initializes a new instance of the ViewerSettings class.
logger - The logger.com.groupdocs.viewer.logging.ILoggerpublic final Cache getCache()
Gets the cache implementation used for storing rendering results.
Cachepublic com.groupdocs.foundation.logging.ILogger getLogger()
Gets the logger implementation used for logging (Errors, Warnings, Traces).
com.groupdocs.viewer.logging.ILoggerpublic void setCache(Cache cache)
Sets the cache implementation used for storing rendering results.
cache - The cache implementation.Cachepublic void setLogger(com.groupdocs.foundation.logging.ILogger logger)
Sets the logger implementation used for logging (Errors, Warnings, Traces).
logger - The logger implementation to set.com.groupdocs.viewer.logging.ILoggerCopyright © 2024. All rights reserved.