How To Add Strike Out Annotation To PDF Documents Using PDF Mosaic .NET

This sample shows how to add strike out annotations to your PDF document.

Use PDFStrikeOutAnnotation class to add strike out annotation.

Strike Out Annotation

 

using PDFMosaic;
using System;

namespace PDFStrikeOutAnnotationSample
{
    class PDFStrikeOutAnnotationSample
    {
        static void Main()
        {
            PDFDocument pdf = new PDFDocument();
            pdf.Pages.Add(new PDFPage(PDFPaperFormat.A4));
            PDFStrikeOutAnnotation annot = new PDFStrikeOutAnnotation(100, 50, 75, 50, 45);
            annot.Contents = "PDF strike out annotation";
            annot.Color = new PDFColorRGB(80, 0, 150);

            pdf.Pages[0].Annotations.Add(annot);
            pdf.Save("TestStrikeOutAnnotation.pdf", true);
        }
    }
}