SpreadsheetBackgroundWatermarkOptions
Leave feedback
On this page
Represents options when adding the watermark as a background to a Spreadsheet worksheet.
public sealed class SpreadsheetBackgroundWatermarkOptions : WatermarkOptions
| Name | Description |
|---|---|
| SpreadsheetBackgroundWatermarkOptions() | Initializes a new instance of the SpreadsheetBackgroundWatermarkOptions class. |
| Name | Description |
|---|---|
| BackgroundHeight { get; set; } | Gets or sets the desired height of the background image in pixels. |
| BackgroundWidth { get; set; } | Get or sets the desired width of the background image in pixels. |
| WorksheetIndex { get; set; } | Get or sets the index of worksheet to add the watermark to. |
Learn more:
Add text watermark to an Excel document worksheet as background.
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\Documents\test.xlsx", loadOptions))
{
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 36));
SpreadsheetBackgroundWatermarkOptions options = new SpreadsheetBackgroundWatermarkOptions();
options.WorksheetIndex = -1; // default
options.BackgroundWidth = 800;
options.BackgroundHeight = 600;
watermarker.Add(watermark, options);
watermarker.Save();
}
- class WatermarkOptions
- namespace GroupDocs.Watermark.Options.Spreadsheet
- 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.