Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/8fc887cb82ff4ad1464a1896fd52843d to your computer and use it in GitHub Desktop.
Save GroupDocsGists/8fc887cb82ff4ad1464a1896fd52843d to your computer and use it in GitHub Desktop.
' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As Document = Document.Load(Utilities.MapSourceFilePath(DocFilePath))
Dim criteria As 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
Dim watermarks As PossibleWatermarkCollection = 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