GroupDocs.Watermark for .NET 24.6 Release Notes

The release of GroupDocs.Watermark version 24.6 contains improvements for the creating repeated watermarks (tile mode)

Full list of changes in this release

KeyCategorySummary
WATERMARKNET-1731EnhancementCreating ability to configure tile options in points
WATERMARKNET-1712🔧 FixFix calculation of spacing between watermarks in the tile mode
WATERMARKNET-1732🔧 FixFixing calculation of spacing between lines in the tile mode

Major Features

Creating ability to configure tile options in points

🌐 This feature allows user to configure watermarks spacing in the tile mode using Points

using (Watermarker watermarker = new Watermarker("test.pdf", new PdfLoadOptions()))
{
    // 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.Points,
            Value = 100
        },
        WatermarkSpacing = new MeasureValue()
        {
            MeasureType = TileMeasureType.Points,
            Value = 70
        },
    };

    watermark.Opacity = 0.3;
    watermark.RotateAngle = -45;

    // Add the text watermark with additional options 
    PdfArtifactWatermarkOptions textWatermarkOptions = new PdfArtifactWatermarkOptions();
    watermarker.Add(watermark, textWatermarkOptions);

    // Save the watermarked document and capture the watermarking result
    WatermarkResult watermarkResult = watermarker.Save("result.pdf");
}