Learn how to add video annotation in PDF in VB.NET with this source code sample. 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 and you can use it to add video annotation in PDF with VB.NET.
You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF SDK for add video annotation in PDF below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instruction. You can use these VB.NET sample examples in one or many applications.
Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VB.NET.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to add a video to PDF 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) ' Add video annotation Dim movie = New Movie("sample.avi") Dim movieAnnotation = New MovieAnnotation(movie, 20, 20, 320, 240) movieAnnotation.MovieActivation.ShowControls = True page.Annotations.Add(movieAnnotation) ' 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