Table of Contents

ImageWatermark Class

Definition

Namespace
GleamTech.DocumentUltimate
Assembly
GleamTech.DocumentUltimate.dll

Represents a set of image watermark options used for document conversion.

public class ImageWatermark : Watermark
Inheritance
ImageWatermark

Constructors

ImageWatermark()

Initializes a new instance of the ImageWatermark class.

Properties

Image

Gets or sets the image file to use as watermark. Image formats in GleamTech.Drawing.ImageFormat and in addition SVG format is supported.

This property can be set to:

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

    This is parsed as a GleamTech.FileProviders.FileSystemFileProvider instance with a GleamTech.FileSystems.Physical.PhysicalLocation instance. 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 plain string which contains a URL or a Data URL.
    (e.g. "http://example.com/SomeFolder/SomeFile.ext", "data:image/gif;base64,...").

    Strings starting with http:// or https:// are parsed as a GleamTech.FileProviders.UrlFileProvider instance.
    Strings starting with data: are parsed as a GleamTech.FileProviders.DataUrlFileProvider instance.

  • A GleamTech.FileProviders.FileProvider instance created with one of the builtin file providers
    (e.g. GleamTech.FileProviders.FileSystemFileProvider, GleamTech.FileProviders.UrlFileProvider, GleamTech.FileProviders.DataUrlFileProvider, GleamTech.FileProviders.StreamFileProvider, GleamTech.FileProviders.MemoryFileProvider, GleamTech.FileProviders.DatabaseFileProvider, GleamTech.FileProviders.AssemblyResourceFileProvider, GleamTech.FileProviders.TemporaryFileProvider).

    You can also override GleamTech.FileProviders.FileProvider base class to implement your custom file provider.

  • A provider string which defines a specific file provider
    (e.g. "Type=FileSystem; File=SomeFile.ext; Location='Type=Physical; Path=c:\SomeFolder'").

The property only needs a readable file provider as it only calls GleamTech.FileProviders.FileProvider.GetInfo() and GleamTech.FileProviders.FileProvider.OpenRead().