Related blog post: Strikethrough Text in Documents using C#
Last active
December 18, 2021 19:34
Strikethrough Text in 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
/* | |
* Strikethrough Text in Word, PDF, Spreadsheets, Presentations using C# | |
*/ | |
using (Annotator annotator = new Annotator("path/document.pdf")) | |
{ | |
StrikeoutAnnotation strikeout = new StrikeoutAnnotation | |
{ | |
FontColor = 0x000000, | |
Opacity = 0.7, | |
PageNumber = 0, | |
Points = new List<Point> | |
{ | |
new Point(183, 770), | |
new Point(308, 770), | |
new Point(183, 752), | |
new Point(308, 752) | |
} | |
}; | |
annotator.Add(strikeout); | |
annotator.Save("path/strikethrough-text.pdf"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment