Extract PDF to text as stream is easy to implement in VB.NET if you use these source codes below. ByteScout PDF Extractor SDK: the SDK is designed to help developers with pdf tables and pdf data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and other utilities. It can extract PDF to text as stream in VB.NET.
The SDK samples like this one below explain how to quickly make your application do extract PDF to text as stream in VB.NET with the help of ByteScout PDF Extractor SDK. Follow the instructions from the scratch to work and copy the VB.NET code. This basic programming language sample code for VB.NET will do the whole work for you to extract PDF to text as stream.
Trial version of ByteScout PDF Extractor SDK can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
Imports System.IO Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) ' Create Bytescout.PDFExtractor.TextExtractor instance Dim extractor As New TextExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile(".\sample1.pdf") ' Get page count Dim pageCount As Integer = extractor.GetPageCount() For i As Integer = 0 To pageCount - 1 ' Create new stream. You can use MemoryStream or any other System.IO.Stream inheritor. Dim stream As FileStream = New FileStream(".\page" + i.ToString() + ".txt", FileMode.Create) ' Save text from page to the file stream extractor.SavePageTextToStream(i, stream) ' Close stream stream.Dispose() Next ' Cleanup extractor.Dispose() ' Open result file in default associated application (for demo purposes) System.Diagnostics.Process.Start(".\page1.txt") End Sub End Class