ByteScout PDF SDK - VBScript and VB6 - Set Show and Hide Widget in PDF - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Set Show and Hide Widget in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Set Show and Hide Widget in PDF

How to set show and hide widget in PDF in VBScript and VB6 and ByteScout PDF SDK

This code in VBScript and VB6 shows how to set show and hide widget in PDF with this how to tutorial

On this page you will learn from code samples for programming in VBScript and VB6.Writing of the code to set show and hide widget in PDF in VBScript and VB6 can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK 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 be used to set show and hide widget in PDF using VBScript and VB6.

This code snippet below for ByteScout PDF SDK works best when you need to quickly set show and hide widget in PDF in your VBScript and VB6 application. Follow the instructions from the scratch to work and copy the VBScript and VB6 code. Code testing will allow the function to be tested and work properly with your data.

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

Try it today: Get 60 Day Free Trial or sign up for Web API

ShowHideWidget.vbs
      
' This example demonstrates how to show/hide a widget in document. ' 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 widget that will be shown/hidden Set editBox1 = comHelpers.CreateEditBox(20, 20, 100, 25, "editBox1") editBox1.Text = "editBox1" page1.Annotations.Add(editBox1) ' Create button that will show the widget Set buttonShow = comHelpers.CreatePushButton(20, 80, 50, 25, "buttonShow") buttonShow.Caption = "Show" page1.Annotations.Add(buttonShow) ' Add Show action Set showAction = comHelpers.CreateHideAction(False) showAction.Fields.Add(editBox1) buttonShow.OnActivated = showAction ' Create button that will hide the widget Set buttonHide = comHelpers.CreatePushButton(100, 80, 50, 25, "buttonHide") buttonHide.Caption = "Hide" page1.Annotations.Add(buttonHide) ' Add Hide action Set hideAction = comHelpers.CreateHideAction(True) hideAction.Fields.Add(editBox1) buttonHide.OnActivated = hideAction ' 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 it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next