On this page you will learn from code samples for programming in VB.NET.Writing of the code to add sound annotation to PDF in VB.NET can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK is the SDK 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. It can add sound annotation to PDF in VB.NET.
This rich sample source code in VB.NET for ByteScout PDF SDK includes the number of functions and options you should do calling the API to add sound annotation to PDF. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
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.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to add an audio annotaion. ''' </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 sound annotation Dim sound = New Sound("sample.wav") Dim soundAnnotation = New SoundAnnotation(sound, 20, 20, 20, 20) page.Annotations.Add(soundAnnotation) ' 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