How To Underline Annotation To PDF Documents Using PDF Mosaic .NET

This sample shows how to underline annotations to your PDF document.

Use PDFUnderlineAnnotation class to add underline annotation.

Underline Annotation


using PDFMosaic;
using System;

namespace PDFUnderlineAnnotationSample
    class PDFUnderlineAnnotationSample
        static void Main()
            PDFDocument pdf = new PDFDocument();
            pdf.Pages.Add(new PDFPage(PDFPaperFormat.A4));
            PDFUnderlineAnnotation annot = new PDFUnderlineAnnotation(100, 50, 75, 50);
            annot.Contents = "PDF underline annotation";
            annot.Color = new PDFColorRGB(0, 50, 150);

            pdf.Save("TestUnderlineAnnotation.pdf", true);