GroupDocs.Watermark for .NET 25.1 Release Notes

The release of GroupDocs.Watermark version 25.1 adds new enhancements and fixes bugs to further improving the product experience.

Full list of changes in this release

KeyCategorySummary
WATERMARKNET-1983🔧 FixTile linespacing value doesn’t work for slides documents
WATERMARKNET-1985🔧 FixTile watermarks added outside of page content
WATERMARKNET-1956🔧 FixTile linespacing value property accepts negative values

Major Features

Tile linespacing value doesn’t work for slides documents

🌐 Previously, users experienced difficulties adjusting the LineSpacing for tiled watermarks in slide documents. Even when different values were set, the visual output remained largely unchanged. This issue has been fixed, ensuring that the specified line spacing values now correctly affect the appearance of tiled watermarks, providing more control and precision.

using (Watermarker watermarker = new Watermarker("test.pptx"))
{
    // Create a text watermark with a specified text and font
    var watermark = new TextWatermark("This is a test watermark", new Font("Arial", 48));
  
    watermark.Opacity = 0.4;
    watermark.RotateAngle = -45;
    watermark.IsBackground = true;

    watermark.TileOptions = new TileOptions()
    {
        TileType = TileType.Straight,
        LineSpacing = new MeasureValue()
        {
            MeasureType = TileMeasureType.Points,
            Value = 200
        },
        WatermarkSpacing = new MeasureValue()
        {
            MeasureType = TileMeasureType.Points,
            Value = 50
        }
    };

    watermarker.Add(watermark);

    // Save the watermarked document and capture the watermarking result
    watermarker.Save("result.pptx");
}

Tile watermarks added outside of page content

🌐 In previous versions, tiled watermarks were sometimes placed outside the page content in certain document types, including slides (presentations), Word, and Excel documents. This issue was particularly noticeable in slide documents, where some watermarks extended beyond the intended page area. With this update, the placement logic has been improved to ensure that tiled watermarks remain within the page boundaries