Latest release (February 2025)
The GroupDocs.Watermark version 25.2 update brings a powerful new feature, multiple enhancements, and essential bug fixes, all aimed at refining performance and elevating the user experience.
Full list of changes in this release
Key | Category | Summary |
---|---|---|
#WATERMARKNET-1987 | ★ Feature | Ability to specify file type when opening document |
#WATERMARKNET-2020 | Enhancement | Using Spreadsheet ModernWordArt as default watermark shape |
#WATERMARKNET-2019 | Enhancement | Supporting multiline text in the excel ModernWordArt |
#WATERMARKNET-2022 | Enhancement | Improve tile watermarks calculation for excel and word documents |
WATERMARKNET-1950 | 🔧 Fix | Tiling watermarking works slowly for large Excel files |
WATERMARKNET-1955 | 🔧 Fix | For pptx file tile watermarks are visible and added far beyond the content of the page |
Major Features
Ability to specify file type when opening document
🌐 The new feature in C# LoadOptions allows users to define the document type in advance, streamlining the loading process. If the file type is known beforehand, specifying it eliminates the need for format detection, enabling faster and more efficient document opening. This enhancement significantly improves performance, especially for large files, as the product no longer needs to try multiple loading strategies. Instead, it directly processes the document based on the provided type, reducing unnecessary overhead and accelerating workflow efficiency.
var filePath = "test.xlsx";
var loadOptions = new LoadOptions()
{
FileType = FileType.FromExtension(Path.GetExtension(filePath))
};
// Or set the FormatFamily property directly when using a stream, for example:
//loadOptions.FormatFamily = FormatFamily.Spreadsheet;
using (var watermarker = new Watermarker(filePath, loadOptions))
{
var watermark = new TextWatermark("This is a test watermark", new Font("Arial", 48));
watermark.Opacity = 0.4;
watermark.RotateAngle = -45;
watermark.IsBackground = true;
watermarker.Add(watermark);
watermarker.Save("result.xlsx");
}
Using Spreadsheet ModernWordArt as default watermark shape
🌐 The new enhancement introduces Spreadsheet ModernWordArt as the default watermark shape, replacing the previous Excel 2003 standard shape. This change was made because MS Excel renders documents with ModernWordArt shapes much faster, improving performance, especially for large spreadsheets.
Supporting multiline text in the excel ModernWordArt
🌐 The latest enhancement introduces support for multiline text in Excel ModernWordArt, allowing users to create more dynamic and visually appealing text elements. Previously, ModernWordArt was restricted to a single line, limiting formatting flexibility. With this update, users can now add and display text across multiple lines, improving readability and customization options.
var filePath = "test.xlsx";
using (var watermarker = new Watermarker(filePath))
{
// Creating multiline text
var watermark = new TextWatermark("Test\nSoftware", new Font("Arial", 20, FontStyle.Bold));
watermark.TextAlignment = TextAlignment.Center;
watermark.Opacity = 0.4;
watermark.RotateAngle = -45;
watermark.IsBackground = true;
watermark.TileOptions = new TileOptions()
{
TileType = TileType.Straight,
LineSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Points,
Value = 50
},
WatermarkSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Points,
Value = 100
},
};
watermarker.Add(watermark);
watermarker.Save("result.xlsx");
}