ByteScout PDF SDK - VBScript and VB6 - Create Submit Form Action in PDF - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Create Submit Form Action in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Create Submit Form Action in PDF

How to create submit form action in PDF in VBScript and VB6 with ByteScout PDF SDK

This tutorial will show how to create submit form action in PDF in VBScript and VB6

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. What is ByteScout PDF SDK? It is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can help you to create submit form action in PDF in your VBScript and VB6 application.

Fast application programming interfaces of ByteScout PDF SDK for VBScript and VB6 plus the instruction and the code below will help you quickly learn how to create submit form action in PDF. Follow the instructions from the scratch to work and copy the VBScript and VB6 code. Use of ByteScout PDF SDK in VBScript and VB6 is also explained in the documentation included along with the product.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

Try ByteScout PDF SDK today: Get 60 Day Free Trial or sign up for Web API

' This example demonstrates how to submit or reset form. ' 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) ' Create sample form Set timesFont = comHelpers.CreateStandardFont(comHelpers.STANDARDFONTS_TIMES, 14) Set blackBrush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) ' EditBox Set editBox1 = comHelpers.CreateEditBox(20, 20, 100, 25, "editBox1") editBox1.Text = "editBox1" page1.Annotations.Add(editBox1) ' CheckBox Set checkBox1 = comHelpers.CreateCheckBox(20, 60, 15, 15, "checkBox1") page1.Annotations.Add(checkBox1) page1.Canvas.DrawString "CheckBox", (timesFont), (blackBrush), 45, 60 ' Add Submit button Set submitButton = comHelpers.CreatePushButton(20, 120, 80, 25, "buttonSubmit") submitButton.Caption = "Submit" page1.Annotations.Add(submitButton) ' Add action Set submitAction = comHelpers.CreateSubmitFormAction("") submitAction.SubmitFormat = comHelpers.SUBMITDATAFORMAT_HTML submitAction.SubmitMethod = comHelpers.SUBMITMETHOD_GET submitAction.Fields.Add(editBox1) submitAction.Fields.Add(checkBox1) submitButton.OnActivated = submitAction ' Add Reset button Set resetButton = comHelpers.CreatePushButton(120, 120, 80, 25, "butonReset") resetButton.Caption = "Reset" page1.Annotations.Add(resetButton) ' Add action Set resetAction = comHelpers.CreateResetFormAction() resetAction.Fields.Add(editBox1) resetAction.Fields.Add(checkBox1) resetButton.OnActivated = resetAction ' 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

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



Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation


Sign Up for free Web API key

Explore Web API Documentation