ByteScout PDF SDK - VB.NET - Add Show-Hide Widget Action in PDF - ByteScout

ByteScout PDF SDK – VB.NET – Add Show-Hide Widget Action in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Add Show-Hide Widget Action in PDF

How to add show hide widget action in PDF in VB.NET and ByteScout PDF SDK

The tutorial below will demonstrate how to add show hide widget action in PDF in VB.NET

Sample source code below will show you how to cope with a difficult task like add show hide widget action in PDF in VB.NET. ByteScout PDF SDK can add show hide widget action in PDF. It can be used from 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.

VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout PDF SDK. Follow the instructions from the scratch to work and copy the VB.NET code. You can use these VB.NET sample examples in one or many applications.

Download free trial version of ByteScout PDF SDK from our website with this and other 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 show/hide a widget in document. ''' </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) ' Create widget that will be shown/hidden Dim editBox = New EditBox(20, 20, 100, 25, "editBox1") editBox.Text = "editBox1" page.Annotations.Add(editBox) ' Create button that will show the widget Dim buttonShow = New PushButton(20, 80, 50, 25, "buttonShow") buttonShow.Caption = "Show" page.Annotations.Add(buttonShow) ' Add Show action Dim showAction = New HideAction(False) showAction.Fields.Add(editBox) buttonShow.OnActivated = showAction ' Create button that will hide the widget Dim buttonHide = New PushButton(100, 80, 50, 25, "buttonHide") buttonHide.Caption = "Hide" page.Annotations.Add(buttonHide) ' Add Hide action Dim hideAction = New HideAction(True) hideAction.Fields.Add(editBox) buttonHide.OnActivated = hideAction ' 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