Related blog post: Wavy Underline the Text in Documents using C#
Last active
December 4, 2021 15:39
-
-
Save GroupDocsGists/0d25b0bfdc7cfaaa084bbaab8509adf9 to your computer and use it in GitHub Desktop.
Add Wavy Underline to Text in Word, PDF, PPT and other Documents using C#
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
/* | |
* Add wavy underline (Squiggly Annotation) to text in PDF file using C# | |
*/ | |
using (Annotator annotator = new Annotator("path/document.pdf")) | |
{ | |
SquigglyAnnotation squiggly = new SquigglyAnnotation | |
{ | |
FontColor = 0xFF0000, | |
Opacity = 0.5, | |
PageNumber = 0, | |
Points = new List<Point> | |
{ | |
new Point(20, 100), | |
new Point(150, 100), | |
new Point(20, 130), | |
new Point(150, 130) | |
} | |
}; | |
annotator.Add(squiggly); | |
annotator.Save("path/squiggly-document.pdf"); | |
} |
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
/* | |
* Add wavy underline (Squiggly Annotation) to text in DOC, DOCX files using C# | |
*/ | |
using (Annotator annotator = new Annotator("path/document.docx")) | |
{ | |
SquigglyAnnotation squiggly = new SquigglyAnnotation | |
{ | |
BackgroundColor = 0xFFF000, | |
FontColor = 0xFF0000, | |
Message = "This is Squiggly Annotation", | |
CreatedOn = DateTime.Now, | |
Opacity = 0.5, | |
PageNumber = 0, | |
Points = new List<Point> | |
{ | |
new Point(20, 170), | |
new Point(290, 170), | |
new Point(20, 200), | |
new Point(290, 200) | |
} | |
}; | |
annotator.Add(squiggly); | |
annotator.Save("path/squiggly-document.docx"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment