// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (Document doc = Document.Load(Utilities.MapSourceFilePath (DocFilePath)))
{
Font font = new Font("Calibri", 8);
TextWatermark watermark = new TextWatermark("Test watermark", font);
watermark.HorizontalAlignment = HorizontalAlignment.Right;
watermark.VerticalAlignment = VerticalAlignment.Top;
watermark.SizingType = SizingType.ScaleToParentDimensions;
watermark.ScaleFactor = 0.5;
// Set rotation angle
watermark.RotateAngle = 45;
doc.AddWatermark(watermark);
doc.Save();
}