This sample shows how to circle annotation to your PDF document.
C# :
using PDFMosaic;
using System;
using System.Drawing;
namespace MarkupAnnotations
{
class MarkupAnnotations
{
static void Main()
{
PDFDocument document = new PDFDocument();
PDFPage page = new PDFPage(PDFPaperFormat.A4);
PDFCircleAnnotation circleAnnotation1 = new PDFCircleAnnotation(70, 30, 80, 50);
circleAnnotation1.BackgroundColor = new PDFColorRGB(250, 255, 255);
circleAnnotation1.BorderStyle.Style = PDFBorderStyle.Dashed;
page.Annotations.Add(circleAnnotation1);
PDFCircleAnnotation circleAnnotation2 = new PDFCircleAnnotation(60, 100, 100, 60);
circleAnnotation2.BorderEffect.Effect = PDFBorderEffect.Cloudy;
circleAnnotation2.BorderEffect.Intensity = 2;
page.Annotations.Add(circleAnnotation);
document.Pages.Add(page);
document.Save("CircleAnnotation.pdf", true);
}
}
}
VB.NET :
Imports PDFMosaic
Imports System
Imports System.Drawing
Module MarkupAnnotations
Sub Main()
Dim document As New PDFDocument()
Dim page As New PDFPage(PDFPaperFormat.A4)
Dim circleAnnotation1 As New PDFCircleAnnotation(70, 30, 80, 50)
circleAnnotation1.BackgroundColor = New PDFColorRGB(250, 255, 255)
circleAnnotation1.BorderStyle.Style = PDFBorderStyle.Dashed
page.Annotations.Add(circleAnnotation1)
Dim circleAnnotation2 As New PDFCircleAnnotation(60, 100, 100, 60)
circleAnnotation2.BorderEffect.Effect = PDFBorderEffect.Cloudy
circleAnnotation2.BorderEffect.Intensity = 2
page.Annotations.Add(circleAnnotation2)
document.Pages.Add(page)
document.Save("CircleAnnotation.pdf", True)
End Sub
End Module