Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active December 18, 2021 19:34
Strikethrough Text in Documents using C#
/*
* 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