com.groupdocs.viewer.config

Class ViewerConfig

  • java.lang.Object
    • com.groupdocs.foundation.config.FoundationConfig
      • com.groupdocs.viewer.config.ViewerConfig
  • All Implemented Interfaces:
    Cloneable


    public class ViewerConfig
    extends com.groupdocs.foundation.config.FoundationConfig
    implements Cloneable

    The Viewer configuration.

    Version:
    17.5.0
    Author:
    GroupDocs.Viewer Team
    • Constructor Detail

      • ViewerConfig

        public ViewerConfig()
    • Method Detail

      • 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.
      • 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.
      • 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.
      • 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.
      • getTempFolderName

        @Deprecated
        public String getTempFolderName()
        Deprecated. 

        The temp folder name.

        Returns:
        a String object.
      • setTempFolderName

        @Deprecated
        public void setTempFolderName(String value)
        Deprecated. 

        The temp folder name.

        Parameters:
        value - 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.
      • 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.
      • getTempPath

        @Deprecated
        public String getTempPath()
        Deprecated. 

        The temp folder path.

        Returns:
        a String object.
      • setTempPath

        @Deprecated
        public void setTempPath(String value)
        Deprecated. 

        The temp folder path.

        Parameters:
        value - a String object.
      • getUseCache

        public boolean getUseCache()

        Indicates whether to cache rendering results or not.

        The following example demonstrates how to enable caching. Using cache will let to avoid processing the same document more than once.
        Returns:
        a boolean.
      • setUseCache

        public void setUseCache(boolean value)

        Indicates whether to cache rendering results or not.

        The following example demonstrates how to enable caching. Using cache will let to avoid processing the same document more than once.
        Parameters:
        value - a boolean.
      • getUsePdf

        public boolean getUsePdf()

        Indicates whether to use intermediate conversion to PDF when rendering document.

        The following example demonstrates how to enable intermediate conversion to PDF. When intermediate conversion to PDF is used, the file data will contain the text with coordinates. This might be useful when you want to add selectable text layer over the image. Rendering in this mode is slower.
        Returns:
        a boolean.
      • setUsePdf

        public void setUsePdf(boolean value)

        Indicates whether to use intermediate conversion to PDF when rendering document.

        The following example demonstrates how to enable intermediate conversion to PDF. When intermediate conversion to PDF is used, the file data will contain the text with coordinates. This might be useful when you want to add selectable text layer over the image. Rendering in this mode is slower.
        Parameters:
        value - a boolean.
      • 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.
      • 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.
      • getEngineType

        public com.groupdocs.viewer.config.EngineTypes getEngineType()

        Current viewer engine.

        Returns:
        a EngineTypes object.
      • setEngineType

        public void setEngineType(com.groupdocs.viewer.config.EngineTypes value)

        Current viewer engine.

        Parameters:
        value - a EngineTypes 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.
      • 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.