ByteScout PDF Extractor SDK – VB.NET – Extract Video

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB.NET – Extract Video

ByteScout PDF Extractor SDK – VB.NET – Extract Video

Program.vb

Imports Bytescout.PDFExtractor

Class Program
    Friend Shared Sub Main(ByVal args As String())

        ' Create Bytescout.PDFExtractor.MultimediaExtractor instance
        Dim extractor As New MultimediaExtractor()
		extractor.RegistrationName = "demo"
		extractor.RegistrationKey = "demo"

        ' Load sample PDF document
        extractor.LoadDocumentFromFile("sample.pdf")

        Dim i As Integer = 0

        ' Initialize movies enumeration
        If extractor.GetFirstVideo() Then
            Do
                Dim outputFileName As String = "movie" & i & extractor.GetCurrentVideoExtension()

                ' Save movie to file
                extractor.SaveCurrentVideoToFile(outputFileName)

                i = i + 1

            Loop While extractor.GetNextVideo() ' Advance movies enumeration
        End If

        ' Cleanup
		extractor.Dispose()

    End Sub
End Class


  Click here to get your Free Trial version of the SDK

prev
next