Created
October 19, 2017 10:58
-
-
Save GroupDocsGists/cb4a19f8105329bb3536c23d25de5a9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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))) | |
{ | |
TextFormattingSearchCriteria criteria = new TextFormattingSearchCriteria(); | |
criteria.ForegroundColorRange = new ColorRange(); | |
criteria.ForegroundColorRange.MinHue = -5; | |
criteria.ForegroundColorRange.MaxHue = 10; | |
criteria.ForegroundColorRange.MinBrightness = 0.01f; | |
criteria.ForegroundColorRange.MaxBrightness = 0.99f; | |
criteria.BackgroundColorRange = new ColorRange(); | |
criteria.BackgroundColorRange.IsEmpty = true; | |
criteria.FontName = "Arial"; | |
criteria.MinFontSize = 19; | |
criteria.MaxFontSize = 42; | |
criteria.FontBold = true; | |
PossibleWatermarkCollection watermarks = doc.FindWatermarks(criteria); | |
watermarks.Clear(); | |
doc.Save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment