GroupDocs.Watermark for .NET 18.8 Release Notes

Major Features

There are the following features, enhancements, and bug fixes in this release:

  • Ability to skip unreadable characters during text watermark search
  • Protection of text watermark using unreadable characters for Slides
  • SmartArt and CustomXml drawing types for Worksheets
  • Fix locking watermark in PPTX, PPT

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WATERMARKNET-895Locking watermark in PPTX, PPT is not workingBug
WATERMARKNET-981Add SmartArt and CustomXml drawing typesEnhancement
WATERMARKNET-998Implement ability to skip unreadable characters during text watermark searchNew Feature
WATERMARKNET-999Implement protection of text watermark using unreadable characters for SlidesNew Feature

Public API and Backward Incompatible Changes

Added SmartArt and CustomXml drawing types

Description

This enhancement adds two new supported drawing types to CellsMsoDrawingType enum: SmartArt and CustomXml.

Public API changes

SmartArt value has been added to CellsMsoDrawingType enum.
CustomXml value has been added to CellsMsoDrawingType enum.

Usage

Remove shapes of SmartArt and CustomXml type from document worksheet:

C#

string inputFileName = @"G:\Input.xlsx";
string outputFileName = @"G:\Output.xlsx";
  
using (CellsDocument document = Document.Load<CellsDocument>(inputFileName))
{
    var shapes = document.Worksheets[0].Shapes;
    for (int i = shapes.Count - 1; i >= 0; i--)
    {
        CellsShape shape = shapes[i];
        if (shape.MsoDrawingType == CellsMsoDrawingType.SmartArt ||
            shape.MsoDrawingType == CellsMsoDrawingType.CustomXml)
        {
            shapes.RemoveAt(i);
        }
    }
    document.Save(outputFileName);
}
Description

This feature allows finding text watermark even if it contains unreadable characters between letters.

Public API changes

SkipUnreadableCharacters property has been added to GroupDocs.Watermark.Search.TextSearchCriteria class.

Usage

Search for text watermarks with skipping unreadable characters:

C#

string inputFileName = @"d:\input.pptx";
 
using (SlidesDocument document = Document.Load<SlidesDocument>(inputFileName))
{
    string watermarkText = "Company name";
    TextSearchCriteria criterion = new TextSearchCriteria(watermarkText);
 
    // Enabling skipping of unreadable characters
    criterion.SkipUnreadableCharacters = true;
 
    PossibleWatermarkCollection result = document.FindWatermarks(criterion);
}

Protection of text watermark using unreadable characters for Slides

Description

This feature allows strengthening protection of text watermark in case of modifying with Find and Replace dialog.

Public API changes

ProtectWithUnreadableCharacters property has been added to GroupDocs.Watermark.Office.Slides.SlidesShapeSettings class.

Usage

Protect text watermark with unreadable characters:

C#

string inputFileName = @"d:\input.pptx";
string outputFileName = @"d:\output.pptx";
 
using (SlidesDocument document = Document.Load<SlidesDocument>(inputFileName))
{
    TextWatermark watermark = new TextWatermark("Watermark text", new Font("Arial", 19));
 
    SlidesShapeSettings settings = new SlidesShapeSettings();
    settings.IsLocked = true;
    settings.ProtectWithUnreadableCharacters = true;
 
    document.AddWatermark(watermark, settings);
 
    document.Save(outputFileName);
}