XDoc.PDF
Features
Tech Specs
How-to VB.NET
Pricing
How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

Using VB.NET PDF SDK
VB.NET PDF Builder: How to draw, add an ellipse shape to PDF file


Visual Basic .NET Demo Code to create, draw, add an ellipse graph to pdf document














Draw ellipse on PDF context in vb.net


...
Dim ctx As PDFContext = New PDFContext()
' set figure size: width 600 pixels; height 200 pixels
ctx.SetWidth(New RELength(600, Units.PX))
ctx.SetHeight(New RELength(200, Units.PX))
' draw And fill 3 ellipses
ctx.FillEllipse(New RESolidBrush(New REColor(255, 0, 0)), 150, 10, 180, 80)
ctx.DrawEllipse(New REPen(New REColor(0, 0, 0)), 150, 10, 180, 80)
ctx.FillEllipse(New RESolidBrush(New REColor(0, 255, 0)), 300, 10, 150, 70)
ctx.DrawEllipse(New REPen(New REColor(0, 0, 0), 3.0F), 300, 10, 150, 70)
ctx.DrawEllipse(New REPen(New REColor(0, 0, 255), 5.0F), 240, 75, 120, 100)
Dim figure As Figure = New Figure(ctx)
document.Add(figure)
...




Add context to PDF document using vb.net


Dim outputFilePath As String = "C:\Sample25.pdf"

Dim document As Document = New Document()
PDFBuildHandler.Create(document, outputFilePath)
' open document
document.Open()
' create Figure
Dim ctx As PDFContext = New PDFContext()
...
...
Dim figure As Figure = New Figure(ctx)
document.Add(figure)
' close document and save to the output file
document.Close()


Let's see the result of adding ellipses on PDF using vb.net: