SpreadsheetBackgroundWatermarkOptions class
Leave feedback
On this page
Represents options when adding the watermark as a background to a Spreadsheet worksheet.
Learn more: https://docs.groupdocs.com/display/watermarknet/Add+watermarks+to+spreadsheet+documents
The SpreadsheetBackgroundWatermarkOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the SpreadsheetBackgroundWatermarkOptions class. |
| Property | Description |
|---|---|
| background_height | The desired height of the background image in pixels. |
| background_width | The desired width of the background image in pixels. |
| worksheet_index | The index of the worksheet to add the watermark to. |
| Field | Description |
|---|---|
| DEFAULT | Gets the default value for the class. (inherited from WatermarkOptions) |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.options.spreadsheet import SpreadsheetLoadOptions, SpreadsheetBackgroundWatermarkOptions
from groupdocs.watermark.watermarks import TextWatermark, Font
load_options = SpreadsheetLoadOptions()
with Watermarker(r"C:\Documents\test.xlsx", load_options) as watermarker:
watermark = TextWatermark("Test watermark", Font("Arial", 36))
options = SpreadsheetBackgroundWatermarkOptions()
options.worksheet_index = -1 # default
options.background_width = 800
options.background_height = 600
watermarker.add(watermark, options)
watermarker.save()
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.