com.groupdocs.viewer.config

Class ViewerConfig

  • All Implemented Interfaces:
    Cloneable


    public class ViewerConfig
    extends Object
    implements Cloneable

    The Viewer configuration.

    • Constructor Detail

      • ViewerConfig

        public ViewerConfig()

        Initializes a new instance of the ViewerConfig class.

    • Method Detail

      • getCacheFolderName

        public String getCacheFolderName()

        The name of the cache folder.

        The following example demonstrates how to set cache folder name. As the cache path has not been set, cache will be stored inside the 'C:\storage\cachefolder\'. When the cache path is not set, cache will be stored in the directory with the cache folder name inside the storage directory.
        Returns:
        a String object.
      • getCachePath

        public String getCachePath()

        The path to the directory, where the cache will be stored.

        The following example demonstrates how to set the cache path. When the cache path is set, the cache folder name will be ignored.
        Returns:
        a String object.
      • getEnableCaching

        public boolean getEnableCaching()
      • getFontDirectories

        public List<String> getFontDirectories()
      • getForcePasswordValidation

        public boolean getForcePasswordValidation()
      • getLocalesPath

        public String getLocalesPath()

        The path to locales.

        The following example demonstrates how to set locales path. Locales (xml files with localized strings) if present, will be loaded from locales path directory. Files inside this directory should have the following naming convention: "LocalizedStrings-{Language Culture Name}.xml" where {Language Culture Name} is your culture name e.g. "fr-FR". To learn more <a href="http://www.groupdocs.com/docs/display/viewernet/Working+to+Create+and+Use+File+with+Localized+Strings">press here</a>.
        Returns:
        a String object.
      • getPageNamePrefix

        public String getPageNamePrefix()

        The prefix for generated page name. Default is "page".

        The following example demonstrates how to set the page name prefix. The page name prefix is used for naming files in the cache.
        Returns:
        a String object.
      • getStoragePath

        public String getStoragePath()

        The path to the documents storage directory.

        The following example demonstrates how to set the storage path and render document located inside the storage directory. Storage path acts as a base location in the file system, for the documents rendering. When the full path to the document is not provided, API assumes that the document is located in the storage directory. By default, cache files are stored in the folder, inside the storage directory.
        Returns:
        a String object.
      • setCacheFolderName

        public void setCacheFolderName(String value)

        The name of the cache folder.

        The following example demonstrates how to set cache folder name. As the cache path has not been set, cache will be stored inside the 'C:\storage\cachefolder\'. When the cache path is not set, cache will be stored in the directory with the cache folder name inside the storage directory.
        Parameters:
        value - a String object.
      • setCachePath

        public void setCachePath(String value)

        The path to the directory, where the cache will be stored.

        The following example demonstrates how to set the cache path. When the cache path is set, the cache folder name will be ignored.
        Parameters:
        value - a String object.
      • setEnableCaching

        public void setEnableCaching(boolean value)
      • setFontDirectories

        public void setFontDirectories(List<String> value)
      • setForcePasswordValidation

        public void setForcePasswordValidation(boolean value)
      • setLocalesPath

        public void setLocalesPath(String value)

        The path to locales.

        The following example demonstrates how to set locales path. Locales (xml files with localized strings) if present, will be loaded from locales path directory. Files inside this directory should have the following naming convention: "LocalizedStrings-{Language Culture Name}.xml" where {Language Culture Name} is your culture name e.g. "fr-FR". To learn more <a href="http://www.groupdocs.com/docs/display/viewernet/Working+to+Create+and+Use+File+with+Localized+Strings">press here</a>.
        Parameters:
        value - a String object.
      • setPageNamePrefix

        public void setPageNamePrefix(String value)

        The prefix for generated page name. Default is "page".

        The following example demonstrates how to set the page name prefix. The page name prefix is used for naming files in the cache.
        Parameters:
        value - a String object.
      • setStoragePath

        public void setStoragePath(String value)

        The path to the documents storage directory.

        The following example demonstrates how to set the storage path and render document located inside the storage directory. Storage path acts as a base location in the file system, for the documents rendering. When the full path to the document is not provided, API assumes that the document is located in the storage directory. By default, cache files are stored in the folder, inside the storage directory.
        Parameters:
        value - a String object.