ByteScout PDF SDK - VB.NET - Create CheckBox in PDF Form - ByteScout

ByteScout PDF SDK – VB.NET – Create CheckBox in PDF Form

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Create CheckBox in PDF Form

How to create checkbox in PDF form in VB.NET and ByteScout PDF SDK

How to code in VB.NET to create checkbox in PDF form with this step-by-step tutorial

The sample source code below will teach you how to create checkbox in PDF form in VB.NET. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings. It can be used to create checkbox in PDF form using VB.NET.

VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout PDF SDK. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample codes in VB.NET.

Trial version of ByteScout PDF SDK is available for free. Source code samples are included to help you with your VB.NET app.

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.vb
      
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

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Get ByteScout PDF SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next