ByteScout PDF Suite - VBScript - Create text fields in pdf with pdf sdk - ByteScout

ByteScout PDF Suite – VBScript – Create text fields in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VBScript – Create text fields in pdf with pdf sdk

How to create text fields in pdf with pdf sdk in VBScript using ByteScout PDF Suite

Step-by-step tutorial on how to create text fields in pdf with pdf sdk in VBScript

Create text fields in pdf with pdf sdk is simple to apply in VBScript if you use these source codes below. ByteScout PDF Suite can create text fields in pdf with pdf sdk. It can be applied from VBScript. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VBScript code from ByteScout PDF Suite for create text fields in pdf with pdf sdk below and use it in your application. Just copy and paste the code into your VBScript application’s code and follow the instructions. This basic programming language sample code for VBScript will do the whole work for you to create text fields in pdf with pdf sdk.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

TextFields.vbs
      
' This example demonstrates how text fields and theirs variations. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) ' Add simple text field with default properties Set edit1 = comHelpers.CreateEditBox(20, 20, 120, 25, "editBox1") edit1.Text = "One two three" page1.Annotations.Add(edit1) ' Add password box Set edit2 = comHelpers.CreateEditBox(20, 50, 120, 25, "editBox2") edit2.Text = "password" edit2.Password = True page1.Annotations.Add(edit2) ' Add multiline text field Set edit3 = comHelpers.CreateEditBox(20, 80, 120, 50, "editBox3") edit3.Multiline = True edit3.Text = "The quick brown fox jumps over, the lazy dog." page1.Annotations.Add(edit3) ' Demonstrate various decoration properties Set edit4 = comHelpers.CreateEditBox(20, 135, 120, 30, "editBox4") edit4.Text = "Decorated text field" edit4.TextAlign = comHelpers.TEXTALIGN_RIGHT edit4.BackgroundColor = comHelpers.CreateColorRGB(255, 240, 240) edit4.BorderWidth = 2 edit4.BorderStyle = comHelpers.BORDERSTYLE_DASHED edit4.BorderColor = comHelpers.CreateColorRGB(128, 0, 0) edit4.FontColor = comHelpers.CreateColorRGB(128, 0, 0) edit4.Font.Size = 9 page1.Annotations.Add(edit4) ' Save document to file pdfDocument.Save("result.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite 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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next