ImageWatermark
Leave feedback
On this page
Represents an image watermark.
public sealed class ImageWatermark : Watermark, IDisposable
| Name | Description |
|---|---|
| ImageWatermark(Stream) | Initializes a new instance of the ImageWatermark class with a specified stream. |
| ImageWatermark(string) | Initializes a new instance of the ImageWatermark class with a specified file path. |
| Name | Description |
|---|---|
| ConsiderParentMargins { get; set; } | Gets or sets a value indicating whether the watermark size and coordinates are calculated considering parent margins. |
| Height { get; set; } | Gets or sets the desired height of this Watermark. |
| HorizontalAlignment { get; set; } | Gets or sets the horizontal alignment of this Watermark. |
| IsBackground { get; set; } | Gets or sets a value indicating whether the watermark should be placed at background. |
| Margins { get; set; } | Gets or sets the margin settings of this Watermark. |
| Opacity { get; set; } | Gets or sets the opacity of this Watermark. |
| PagesSetup { get; set; } | Gets or sets the pages setup settings of this Watermark. |
| RotateAngle { get; set; } | Gets or sets the rotate angle of this Watermark in degrees. |
| SaveResultInMetadata { get; set; } | Gets or sets a value indicating whether to save information about added watermarks in the document metadata. |
| ScaleFactor { get; set; } | Gets or sets a value that defines how watermark size depends on parent size. |
| SizingType { get; set; } | Gets or sets a value specifying a way watermark should be sized. |
| TileOptions { get; set; } | Get or sets options to define repeated watermark |
| VerticalAlignment { get; set; } | Gets or sets the vertical alignment of this Watermark. |
| Width { get; set; } | Gets or sets the desired width of this Watermark. |
| X { get; set; } | Gets or sets the x-coordinate of this Watermark. |
| Y { get; set; } | Gets or sets the y-coordinate of this Watermark. |
| Name | Description |
|---|---|
| Dispose() | Disposes the current instance. |
Learn more:
Add image watermark to a document of any supported type.
foreach (string filePath in Directory.GetFiles(@"C:\Documents"))
{
using (Watermarker watermarker = new Watermarker(filePath))
{
using (ImageWatermark watermark = new ImageWatermark(@"C:\watermark.png"))
{
watermark.HorizontalAlignment = HorizontalAlignment.Center;
watermark.VerticalAlignment = VerticalAlignment.Center;
watermarker.Add(watermark);
}
watermarker.Save();
}
}
- class Watermark
- namespace GroupDocs.Watermark.Watermarks
- assembly GroupDocs.Watermark
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.