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/2955280a58d4f3bf52e92ba68b4fbd4c to your computer and use it in GitHub Desktop.
Save GroupDocsGists/2955280a58d4f3bf52e92ba68b4fbd4c 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 (SlidesDocument doc = Document.Load<SlidesDocument>(Utilities.MapSourceFilePath(FilePath)))
{
foreach (SlidesSlide slide in doc.Slides)
{
for (var i = slide.Shapes.Count - 1; i >= 0; i--)
{
foreach (var fragment in slide.Shapes[i].FormattedTextFragments)
{
if (fragment.ForegroundColor == Color.Red && fragment.Font.FamilyName == "Arial")
{
slide.Shapes.RemoveAt(i);
break;
}
}
}
}
doc.Save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment