It’s been quite long since we released the last version of GroupDocs.Watermark for .NET API. The reason behind this gap was to introduce a more simplified and optimized watermark manipulation API for the .NET platform. Today, I am excited to announce that the API v2 of GroupDocs.Watermark for .NET has been released as v19.10 and it is available for download.

What’s new in the latest release?

The major updates have been done at the architecture level of the API to simplify its usage. Furthermore, we have performed major product optimization in the codebase and introduced unified classes to deal with watermarking operations for all the supported document formats. Some key reasons for these updates are listed below:

  • Watermarker class is introduced as a single entry point to manage watermarks in the document (instead of Document class from previous versions).
  • Adding watermarks has been unified for all supported document formats.
  • The product architecture has been redesigned from scratch in order to simplify the usage of different options to manage the watermarks.
  • Document information and preview generation procedures have been simplified.

How to migrate?

The legacy API has been moved into Legacy namespace so you’ll have to make a project-wide replacement of namespaces from GroupDocs.Watermark to GroupDocs.Watermark.Legacy to resolve build issues after upgrading to v19.10. Furthermore, below is a code comparison of how to use the basic features of the API using the old and the latest version.

Adding Watermark

The following code samples give you a comparison of how to add watermark to the document using old and new API.

Old API

New API

Searching Watermarks

The following code samples show you the comparison of finding watermarks using search criteria.

Old API

New API

Removing Watermarks

The following code samples demonstrate the comparison of removing all possible watermarks.

Old API

New API

Getting Document Info

The following code samples show how to get document information from the local file.

Old API

New API

For more details, please have a look at the migration notes. Visit the release notes of v19.10 to see all the changes in the public API. You can download or clone the examples project from GitHub to evaluate each feature of the API. In case you would have any question or querie, you can raise it via our forum.