Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF Suite for reduce memory usage with pdf extractor sdk below and use it in your application. Simply copy and paste in your VB.NET project or application you and then run your app! Want to see how it works with your data then code testing will allow the function to be tested and work properly.
ByteScout PDF Suite free trial version is available on our website. VB.NET and other programming languages are supported.
Imports Bytescout.PDFExtractor Imports System.IO Class Program Friend Shared Sub Main(args As String()) ' When processing huge PDF documents you may run into OutOfMemoryException. ' This example demonstrates a way to spare the memory by disabling page data caching. ' Create Bytescout.PDFExtractor.TextExtractor instance Using extractor As New TextExtractor("demo", "demo") Try ' Load sample PDF document extractor.LoadDocumentFromFile("sample2.pdf") ' Disable page data caching, so processed pages wiil be disposed automatically extractor.PageDataCaching = PageDataCaching.None ' Save extracted text to file extractor.SaveTextToFile("output.txt") Catch exception As PDFExtractorException Console.Write(exception.ToString()) End Try End Using ' Open result file in default associated application (for demo purposes) System.Diagnostics.Process.Start("output.txt") End Sub End Class