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

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

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

How to create listbox in PDF form in VB.NET using ByteScout PDF SDK

Write code in VB.NET to create listbox in PDF form with this step-by-step tutorial

Every ByteScout tool contains example VB.NET source codes that you can find here or in the folder with installed ByteScout product. ByteScout PDF SDK is the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings. It can create listbox in PDF form in VB.NET.

This code snippet below for ByteScout PDF SDK works best when you need to quickly create listbox in PDF form in your VB.NET application. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Use of ByteScout PDF SDK in VB.NET is also explained in the documentation included along with the product.

You can download free trial version of ByteScout PDF SDK from our website to see and try many others 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)

Program.vb
      
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to create a listbox. ''' </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 list box, add items and make it multi-selectable Dim listBox1 = New ListBox(20, 20, 120, 80, "listBox1") listBox1.Items.Add("Value 1") listBox1.Items.Add("Value 2") listBox1.Items.Add("Value 3") listBox1.Items.Add("Value 4") listBox1.Items.Add("Value 5") listBox1.MultiSelect = True ' Decorate listbox listBox1.Font = New Font(StandardFonts.Helvetica, 10) listBox1.FontColor = New ColorRGB(0, 0, 128) listBox1.BorderColor = New ColorRGB(0, 0, 128) listBox1.BackgroundColor = New ColorRGB(240, 240, 255) listBox1.BorderWidth = 2 page.Annotations.Add(listBox1) ' 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next