PDF Mosaic: How to add underline annotation to PDF documents


Home       Features       Download       Tutorial       Version History       License       Source Code

 

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

Use PDFUnderlineAnnotation class to add 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.Pages[0].Annotations.Add(annot);
            pdf.Save("TestUnderlineAnnotation.pdf", true);
        }
    }
}

 


Home       Features       Download       Tutorial       Version History       License       Source Code