GroupDocs.Watermark for .NET 17.8.0 Release Notes

Major Features

There are the following features and enhancements in this release:

  • Ability to specify which objects should be included in watermark search
  • Ability to specify Dynabic.Metered account to run GroupDocs.Watermark in licensed mode

Full List of Issues Covering all Changes in this Release

Key SummaryCategory
WATERMARKNET-516Implement settings allowing user to specify which objects should be included in watermark search New Feature 
WATERMARKNET-611Intergrate metered licensing API to GroupDocs.WatermarkNew Feature 

Public API and Backward Incompatible Changes

Description

This feature allows the user to specify which objects should be included in watermark search. Restricting searchable objects, the user can significantly increase search performance.

Public API changes

SearchableObjects class has been added to GroupDocs.Watermark.Search namespace.
CellsSearchableObjects enum has been added to GroupDocs.Watermark.Search namespace.
DiagramSearchableObjects enum has been added to GroupDocs.Watermark.Search namespace.
SlidesSearchableObjects enum has been added to GroupDocs.Watermark.Search namespace.
WordsSearchableObjects enum has been added to GroupDocs.Watermark.Search namespace.
PdfSearchableObjects enum has been added to GroupDocs.Watermark.Search namespace.
DefaultSearchableObjects static property has been added to Document class.
SearchableObjects property has been added to Document class.

Usage

Set searchable objects globally (for all documents that will be created after that)

C#

Document.DefaultSearchableObjects = new SearchableObjects
{
    WordsSearchableObjects = WordsSearchableObjects.Hyperlinks | WordsSearchableObjects.Text,
    CellsSearchableObjects = CellsSearchableObjects.HeadersFooters,
    SlidesSearchableObjects = SlidesSearchableObjects.SlidesBackgrounds | SlidesSearchableObjects.Shapes,
    DiagramSearchableObjects = DiagramSearchableObjects.None,
    PdfSearchableObjects = PdfSearchableObjects.All
};

foreach (var file in Directory.GetFiles(@"D:\files"))
{
    using (var doc = Document.Load(file))
    {
        var watermarks = doc.FindWatermarks();

        // The code for working with found watermarks goes here.
    }
}

Set searchable objects for a particular document instance

C#

using (var doc = Document.Load(@"D:\test.pdf"))
{
    // Search for hyperlinks only.
    doc.SearchableObjects.PdfSearchableObjects = PdfSearchableObjects.Hyperlinks;
    var watermarks = doc.FindWatermarks();

    // The code for working with found watermarks goes here.
}

Integrate metered licensing API to GroupDocs.Watermark

Description

This feature allows the user to specify Dynabic.Metered account to run GroupDocs.Watermark in licensed mode.

Public API changes

Metered class has been added to GroupDocs.Watermark namespace.

Usage

This example demonstrates how to use the library in licensed mode using Dynabic.Metered account:

C#

string publicKey = "[Your Dynabic.Metered public key]";
string privateKey = "[Your Dynabic.Metered private key]";

Metered metered = new Metered();
metered.SetMeteredKey(publicKey, privateKey);

// Use the library in licensed mode