GroupDocs.Watermark for .NET 17.6.0 Release Notes

Major Features

There are following features in this first release:

  • Ability to set additional options for slide background image in PowerPoint document
  • Ability to add watermark to a particular page of a Word document
  • Ability to set background image for a chart in Excel document
  • Ability to set background image for a chart in PowerPoint document

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WATERMARKNET-482Implement ability to add watermark to a particular page of a Word documentNew Feature
WATERMARKNET-507Implement ability to set background image for a chart in Excel documentNew Feature
WATERMARKNET-509Implement ability to set background image for a chart in PowerPoint documentNew Feature
WATERMARKNET-540Implement ability to set additional options for slide background image in PowerPoint documentEnhancement

Public API and Backward Incompatible Changes

Ability to set additional options for slide background image in PowerPoint document

This enhancement provides new functionality for slide’s background image. It allows the user to tile picture across slide’s background and to make the image semitransparent.

Public API changes

ImageFillFormat property has been added to SlidesBaseSlide class.

SlidesBaseSlide.BackgroundImage property has been marked as obsolete.

Usage

Set tiled semitransparent image background for a particular slide.

C#

using (SlidesDocument doc = Document.Load<SlidesDocument>(@"D:\input.pptx"))
{
	SlidesSlide slide = doc.Slides[0];
	slide.ImageFillFormat.BackgroundImage = new SlidesWatermarkableImage(File.ReadAllBytes(@"D:\background.png"));
	slide.ImageFillFormat.TileAsTexture = true;
	slide.ImageFillFormat.Transparency = 0.5;
	doc.Save();
}

Ability to add watermark to a particular page of a Word document

This feature allows the user to add watermark to a particular page of a Word document.

Public API changes

PageCount property has been added to WordsDocument class.
AddWatermark(Watermark, int) method has been added to WordsDocument.

Usage

Add watermark to the last page of a Word document.

C#

using (WordsDocument doc = Document.Load<WordsDocument>(@"D:\test.doc"))
{
	TextWatermark textWatermark = new TextWatermark("DRAFT", new Font("Arial", 42));

        // Add watermark to the last page
	doc.AddWatermark(textWatermark, doc.PageCount);
	doc.Save();
}

Ability to set background image for a chart in Excel document

This feature allows the user to set the background image for a chart inside Excel document.

Public API changes

Charts property has been added to CellsWorksheet class.

CellsChartCollection class has been added to GroupDocs.Watermark.Office.Cells namespace.

CellsChart class has been added to GroupDocs.Watermark.Office.Cells namespace.

CellsImageFillFormat class has been added to GroupDocs.Watermark.Office.Cells namespace.

Usage

Set image background for a particular chart in Excel document.

C#

using (CellsDocument doc = Document.Load<CellsDocument>(@"D:\test.xlsx"))
{
	doc.Worksheets[0].Charts[0].ImageFillFormat.BackgroundImage = new CellsWatermarkableImage(File.ReadAllBytes(@"D:\test.png"));
	doc.Worksheets[0].Charts[0].ImageFillFormat.Transparency = 0.5;
	doc.Worksheets[0].Charts[0].ImageFillFormat.TileAsTexture = true;
	doc.Save();
}

Ability to set background image for a chart in PowerPoint document

This feature allows the user to set the background image for a chart inside PowerPoint document.

Public API changes

Charts property has been added to SlidesBaseSlide class.

SlidesChartCollection class has been added to GroupDocs.Watermark.Office.Slides namespace.

SlidesChart class has been added to GroupDocs.Watermark.Office.Slides namespace.

SlidesImageFillFormat class has been added to GroupDocs.Watermark.Office.Slides namespace.

Usage

Set image background for a particular chart in PowerPoint document.

C#

using (var doc = Document.Load<SlidesDocument>(@"D:\test.pptx"))
{
	doc.Slides[0].Charts[0].ImageFillFormat.BackgroundImage = new SlidesWatermarkableImage(File.ReadAllBytes(@"D:\test.png"));
	doc.Slides[0].Charts[0].ImageFillFormat.Transparency = 0.5;
	doc.Slides[0].Charts[0].ImageFillFormat.TileAsTexture = true;
	doc.Save();
}