The sample source codes on this page shows how to create checkbox in pdf form with pdf sdk in VB.NET. Want to create checkbox in pdf form with pdf sdk in your VB.NET app? ByteScout Premium Suite is designed for it. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Premium Suite for create checkbox in pdf form with pdf sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Further improvement of the code will make it more robust.
If you want to try other source code samples then the free trial version of ByteScout Premium Suite is available for download from our website. Just try other source code samples for VB.NET.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports Bytescout.PDF
''' <summary>
''' This example demonstrates how to create checkboxes.
''' </summary>
Class Program
Shared Sub Main()
' Create new document
Dim pdfDocument = New Document()
pdfDocument.RegistrationName = "demo"
pdfDocument.RegistrationKey = "demo"
' Add page
Dim page = New Page(PaperFormat.A4)
pdfDocument.Pages.Add(page)
' Add unchecked checkbox
Dim checkBox1 = New CheckBox(20, 20, 15, 15, "checkBox1")
page.Annotations.Add(checkBox1)
' Add checked checkbox
Dim checkBox2 = New CheckBox(20, 40, 15, 15, "checkBox2")
checkBox2.Checked = True
page.Annotations.Add(checkBox2)
' Add readonly checkbox
Dim checkBox3 = New CheckBox(20, 60, 15, 15, "checkBox3")
checkBox3.Checked = True
checkBox3.ReadOnly = True
page.Annotations.Add(checkBox3)
' Draw text labels
Dim font = New Font(StandardFonts.Times, 12)
Dim brush = New SolidBrush()
page.Canvas.DrawString("Unchecked box", font, brush, 45, 20)
page.Canvas.DrawString("Checked box", font, brush, 45, 40)
page.Canvas.DrawString("Read-only checked box", font, brush, 45, 60)
' Save document to file
pdfDocument.Save("result.pdf")
' Cleanup
pdfDocument.Dispose()
' Open document in default PDF viewer app
Process.Start("result.pdf")
End Sub
End Class
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: