Created
October 19, 2017 10:59
-
-
Save GroupDocsGists/f7ad69504bbf6c2579db227f80cf12ad 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 doc As DiagramDocument = Document.Load(Of DiagramDocument)(Utilities.MapSourceFilePath(FilePath)) | |
For Each page As DiagramPage In doc.Pages | |
For i As Object = page.Shapes.Count - 1 To 0 Step -1 | |
For Each fragment As Object In page.Shapes(i).FormattedTextFragments | |
If fragment.ForegroundColor = Color.Red AndAlso fragment.Font.FamilyName = "Arial" Then | |
page.Shapes.RemoveAt(i) | |
Exit For | |
End If | |
Next | |
Next | |
Next | |
doc.Save() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment