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.

    • Constructor Detail

      • ViewerConfig

        public ViewerConfig()
    • Method Detail

      • getStoragePath

        public String getStoragePath()

        The storage path.

      • setStoragePath

        public void setStoragePath(String value)

        The storage path.


         The following example demonstrates how to set storage path.
         
         ViewerConfig config = new ViewerConfig();
         config.setStoragePath("C:\\storage");
         

      • getCacheFolderName

        public String getCacheFolderName()

        The name of cache folder.

      • setCacheFolderName

        public void setCacheFolderName(String value)

        The name of cache folder.


         The following example demonstrates how to set name of cache folder.
         
         ViewerConfig config = new ViewerConfig();
         config.setStoragePath("C:\\storage");
         config.setCacheFolderName("cachefolder");
         

      • getTempFolderName

        @Deprecated
        public String getTempFolderName()
        Deprecated. 

        The temp folder name.

        Value: The temp folder name.
      • setTempFolderName

        @Deprecated
        public void setTempFolderName(String value)
        Deprecated. 

        The temp folder name.

        Value: The temp folder name.
      • getCachePath

        public String getCachePath()

        The path to cache directory.

      • setCachePath

        public void setCachePath(String value)

        The path to cache directory.


         The following example demonstrates how to set path to cache directory.
         
         ViewerConfig config = new ViewerConfig();
         config.setCachePath("C:\\cachefolder");
         

      • getTempPath

        @Deprecated
        public String getTempPath()
        Deprecated. 

        The temp folder path.

        Value: The temp path.
      • setTempPath

        @Deprecated
        public void setTempPath(String value)
        Deprecated. 

        The temp folder path.

        Value: The temp path.
      • getUseCache

        public boolean getUseCache()

        Indicates whether to cache rendering results or not.

      • setUseCache

        public void setUseCache(boolean value)

        Indicates whether to cache rendering results or not.


         The following example demonstrates how to enable caching.
         
         ViewerConfig config = new ViewerConfig();
         config.setUseCache(true);
         

      • getUsePdf

        public boolean getUsePdf()

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

      • setUsePdf

        public void setUsePdf(boolean value)

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


         The following example demonstrates how to enable intermediate conversion to PDF.
         
         ViewerConfig config = new ViewerConfig();
         config.setUsePdf(true);
         

      • getLocalesPath

        public String getLocalesPath()

        The path to folder with localized strings.

      • setLocalesPath

        public void setLocalesPath(String value)

        The path to folder with localized strings.


         The following example demonstrates how to set path to folder with localized strings.
         
         ViewerConfig config = new ViewerConfig();
         config.setLocalesPath("D:\\Locales");
         


        This is a path to the directory, containing XML files with localized strings. Files inside this directory should have following naming convention: "LocalizedStrings-{Language Culture Name}.xml" where {Language Culture Name} is your culture name e.g. "fr-FR".

      • getEngineType

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

        Current viewer engine.

        Value: The type of the engine.
      • setEngineType

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

        Current viewer engine.

        Value: The type of the engine.
      • getPageNamePrefix

        public String getPageNamePrefix()

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

      • setPageNamePrefix

        public void setPageNamePrefix(String value)

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


         The following example demonstrates how to set page name prefix.
         
         ViewerConfig config = new ViewerConfig();
         config.setPageNamePrefix("mypageprefix");