Great news for .NET developers! GroupDocs.Watermark for .NET 24.3 (DLLs only package) introduces useful feature enhancements related to tiled watermarks for MS Office formats (Excel and PowerPoint), Visio, and images.
Empowered Tiled Watermark Control in Excel Documents
The .NET document watermarking API now includes refined functionality of tiled watermarks within Excel spreadsheets on Windows, Linux, and macOS systems. Developers can use the TileOptions
property to specify line and watermark spacing for tiled watermarks. The following code sample shows how to use this feature in C#.
using (Watermarker watermarker = new Watermarker("test.xlsx", new SpreadsheetLoadOptions()))
{
// Create a text watermark with a specified text and font
var watermark = new TextWatermark("watermark", new Font("Arial", 48));
// Configure TileOptions
watermark.TileOptions = new TileOptions()
{
LineSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 12
},
WatermarkSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 10
},
};
watermark.Opacity = 0.3;
watermark.RotateAngle = -30;
// Add the text watermark with additional options
var watermarkOptions = new SpreadsheetWatermarkShapeOptions();
watermarkOptions.IsLocked = true;
watermarker.Add(watermark, watermarkOptions);
// Save the watermarked document and capture the watermarking result
WatermarkResult watermarkResult = watermarker.Save("result.xlsx");
}
Source*
Streamline Tiled Watermarks in Images
GroupDocs.Watermark for .NET 24.3 delivers greater tiled watermark control in image file formats by leveraging the TileOptions
property. This property lets you customize the spacing and positioning of watermarks easily. The following code sample demonstrates how to add tiled watermarks to an image.
using (Watermarker watermarker = new Watermarker("test.png", new ImageLoadOptions()))
{
// Create a text watermark with a specified text and font
var watermark = new TextWatermark("watermark", new Font("Arial", 48));
// Configure TileOptions
watermark.TileOptions = new TileOptions()
{
LineSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 12
},
WatermarkSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 10
},
};
watermark.Opacity = 0.3;
watermark.RotateAngle = -30;
watermarker.Add(watermark);
// Save the watermarked document and capture the watermarking result
WatermarkResult watermarkResult = watermarker.Save("result.png");
}
Source*
Control Tiled Watermarks in Presentations and Visio Diagrams
You can now add tiled watermarks to PowerPoint presentations with the most recent .NET API release. This version enables you to create catchy watermarks that blend into your presentation slides on a platform of your choice. Additionally, inserting tiled watermarks into Visio diagrams is also supported by our watermarking API. Seamlessly implement this functionality into your apps and obtain reliable results.
Fixed Bugs
- Resolved a problem where Visio documents could not be read when passing
DiagramLoadOptions
starting from .NET Standard (WATERMARKNET-1605). - Fixed a bug where a PDF watermark used an artifact approach when passing
PdfXObjectWatermarkOptions
(WATERMARKNET-1575). - Fixed an issue where the spreadsheet shape watermark size did not match the specified font size (WATERMARKNET-1609).
- Addressed an issue causing tiled watermark line offsets for positive rotation angles (WATERMARKNET-1602).
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting GroupDocs.Watermark for .NET 24.3 Release Notes.