Table of Contents

DocumentUltimateWebConfiguration Class

Definition

Namespace
GleamTech.DocumentUltimate.AspNet
Assembly
GleamTech.DocumentUltimate.dll

Provides properties and methods for changing this library's configuration for web use.

public sealed class DocumentUltimateWebConfiguration : ConfigurationBase<DocumentUltimateWebConfiguration>
Inheritance
DocumentUltimateWebConfiguration

Constructors

DocumentUltimateWebConfiguration()

Initializes a new instance of the DocumentUltimateWebConfiguration class.

DocumentUltimateWebConfiguration(DocumentUltimateConfiguration)

Initializes a new instance of the DocumentUltimateWebConfiguration class with custom configuration.

Properties

AvailableDisplayCultures

Gets all available display cultures for the document viewer. Cultures for both bundled and custom translation files will be returned.

CacheAutoTrimInterval

Gets or sets a value that specifies the interval to run automatic cache trimming (clean up). Cached items older than cache's MaxAge setting will be removed when the cache is trimmed.

The default value is 15 minutes. The minimum value is 5 minutes. If the value is 0 or negative, the auto trim will be disabled.

In string representation (e.g. when setting in a config file), value in format "d" is considered days (e.g. "30" is 30 days) and value in format "hh:mm" is considered hours and minutes (e.g. "1:30" is 1 hour and 30 minutes). Note that "24:00" would mean 24 days as hour range is 0 to 23 and minute range is 0 to 59. See Parse(string) documentation for details on possible string representations.

CacheEncryptionEnabled

Gets a value that specifies whether encryption of documents should be enabled. The default is true. Document viewer downloads a special document format (XPZ) on the client-side but for additional security (DRM), the document is also encypted by default.

CacheKeepVariations

Gets or sets a value that specifies whether to keep variations of document conversion results. The default is false. For instance when you change watermark options, both Pdf and Xpz outputs are regenerated. By default the Pdf and Xpz outputs are replaced in cache when watermarks are changed. If you set this property to true, the Pdf and Xpz outputs will not be replaced but all variations will be kept in cache instead. This can be useful especially when you want different outputs for different users. So this way, for instance you can have different watermarked variations for each different user.

CacheLocation

Gets or sets the location to store cached documents. The default value is "~/App_Data/DocumentCache".

This property can be set to:

  • A plain string which contains a physical/virtual path
    (e.g. "c:\SomeFolder", "/SomeFolder", "~/SomeFolder").

    This is parsed as GleamTech.FileSystems.Physical.PhysicalLocation.

    Note that virtual paths can only be resolved in a web application
    and on Linux paths starting with "/" are physical paths and not virtual paths.

  • A GleamTech.FileSystems.Location instance created with one of the builtin location providers
    (e.g. GleamTech.FileSystems.Physical.PhysicalLocation, GleamTech.FileSystems.AzureBlob.AzureBlobLocation, GleamTech.FileSystems.AmazonS3.AmazonS3Location, GleamTech.FileSystems.Archive.ArchiveLocation).

    You can also override GleamTech.FileSystems.Location base class to implement your custom location provider.

  • A provider string which defines a specific location provider
    (e.g. "Type=Physical; Path=c:\SomeFolder").

CacheMaxAge

Gets or sets a value that specifies the maximum amount of time to consider a cached item fresh and keep it stored in the cache. Cached items older than this age will be removed when the cache trimming (clean up) runs (when auto trim is run or when cache's Trim() method is manually called).

The default value is 90 days. The minimum value is 10 minutes.

In string representation (e.g. when setting in a config file), value in format "d" is considered days (e.g. "30" is 30 days) and value in format "hh:mm" is considered hours and minutes (e.g. "1:30" is 1 hour and 30 minutes). Note that "24:00" would mean 24 days as hour range is 0 to 23 and minute range is 0 to 59. See Parse(string) documentation for details on possible string representations.

CacheWaitTimeout

Gets or sets a value that specifies the maximum amount of time to wait for a cached item to be available (wait for a file lock from other threads or processes to become available, i.e. wait for an ongoing caching of the same file to complete) before giving up on the cache request.

The default value is 5 minutes. The minimum value is 2 minutes.

In string representation (e.g. when setting in a config file), value in format "d" is considered days (e.g. "30" is 30 days) and value in format "hh:mm" is considered hours and minutes (e.g. "1:30" is 1 hour and 30 minutes). Note that "24:00" would mean 24 days as hour range is 0 to 23 and minute range is 0 to 59. See Parse(string) documentation for details on possible string representations.

Current

Gets current global configuration instance.

DocumentViewerHandlerPath

Gets or sets a value that specifies the application-relative handler path for GleamTech.DocumentUltimate.AspNet.UI.DocumentViewerHandler. The default is "documentviewer.ashx".

It is not recommended to change it unless you have a conflict in your web application. This property will be effective only if it is changed before web application starts.

Methods

GleamTech.Configuration.ConfigurationBase<T>.Clear() (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
GetCache()

Gets the document cache used by this web configuration instance.

InitCurrent()

Initializes only the static Current instance.

Load(bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Load(Func<string, string>, string, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Load(IDictionary<string, string>, string, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Load(NameValueCollection, string, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Load(Stream, ConfigurationFileFormat, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Load(string, ConfigurationFileFormat, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Save(Action<string, string>, string, bool, params Expression<Func<T, object>>[]) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Save(IDictionary<string, string>, string, bool, params Expression<Func<T, object>>[]) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Save(NameValueCollection, string, bool, params Expression<Func<T, object>>[]) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Save(Stream, ConfigurationFileFormat, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)
Save(string, ConfigurationFileFormat, bool) (Inherited from ConfigurationBase<DocumentUltimateWebConfiguration>)