WatermarkerContext Class
Wordize.Watermarking.WatermarkerContext class. Document watermarker context.
WatermarkerContext class
Document watermarker context.
public class WatermarkerContext : ProcessorContext
Constructors
Name | Description |
---|---|
WatermarkerContext() | The default constructor. |
Properties
Name | Description |
---|---|
FontSettings { get; set; } | Allows to specify document font settings. |
ImageWatermark { get; set; } | Image bytes to be used as a watermark. |
ImageWatermarkOptions { get; } | Options for the text watermark. |
LayoutOptions { get; } | Document layout options used by the processor. |
TextWatermark { get; set; } | Text to be used as a watermark. |
TextWatermarkOptions { get; } | Options for the image watermark. |
WarningCallback { get; set; } | Warning callback used by the processor. |
Examples
Shows how to add text watermark in the document using fluent Api.
WatermarkerContext context = new WatermarkerContext();
context.TextWatermark = "Wordize";
context.TextWatermarkOptions.Color = Color.Red;
Watermarker.Create(context)
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "WatermarkerText.docx")
.Execute();
Shows how to add image watermark in the document using fluent Api.
WatermarkerContext context = new WatermarkerContext();
context.ImageWatermark = File.ReadAllBytes(MyDir + "Images/logo.png");
context.ImageWatermarkOptions.Scale = 0.1;
Watermarker.Create(context)
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "WatermarkerImage.docx")
.Execute();
See Also
- class ProcessorContext
- namespace Wordize.Watermarking
- assembly Wordize