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/de076cc840c97193f9553a868045ead5 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/de076cc840c97193f9553a868045ead5 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
Document.DefaultSearchableObjects = new SearchableObjects
{
WordsSearchableObjects = WordsSearchableObjects.Hyperlinks | WordsSearchableObjects.Text,
CellsSearchableObjects = CellsSearchableObjects.HeadersFooters,
SlidesSearchableObjects = SlidesSearchableObjects.SlidesBackgrounds | SlidesSearchableObjects.Shapes,
DiagramSearchableObjects = DiagramSearchableObjects.None,
PdfSearchableObjects = PdfSearchableObjects.All
};
foreach (var file in Directory.GetFiles(@"D:\files"))
{
using (var doc = Document.Load(file))
{
var watermarks = doc.FindWatermarks();
// The code for working with found watermarks goes here.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment