.NET PDF to Text Converter SDK

VB.NET: Convert PDF & Extract Text
Are you looking for a .NET PDF extractor & PDF converter for your VB.NET application development? Do you need to add PDF to text conversion and PDF text extraction features into your VB.NET program? If so, CnetSDK .NET PDF to Text Converter SDK can help you. This .NET PDF library can be used in Visual Studio VB.NET application development. Ant it compiles advanced VB.NET PDF to text converter and PDF extractor to text functions.
ADD PDF TEXT EXTRACTOR &CONVERTER TO VB PROJECT
CnetSDK .NET PDF Text Extractor & Converter library is fully compatible with VB.NET programming language. As long as your development environment is .NET Framework 2.0+, Visual Studio 2005+, and Windows System, you can easily use and integrate CnetSDK .NET PDF extractor & PDF converter for text into VB.NET project. By simply add your VB.NET project reference to CnetSDK.PDFtoText.Converter.Trial.dll, you can use all mature VB.NET APIs and sample VB.NET codes provided below for your application development.

Please Note: By using free .NET PDF to Text Converter & Extractor SDK trial in your VB.NET project, you can only recognize and extract text from the first five PDF pages, or transform & convert these pages of PDF to txt file. If you want to convert or extract all PDF document pages, please order a license.
VB.NET APIS: CONVERT PDF TO TXT & EXTRACT PDF TEXT
The following VB.NET APIs describes how to load your PDF to transform, convert, and extract. In details, you can extract text from PDF file page or a range of PDF pages in VB.NET project. Or you may directly recognize and extract all text from PDF and convert PDF to a txt file. Please see details below.
' Use these VB.NET APIs to load a PDF file to your VB.NET project.
public Boolean LoadPdfFile(Stream Stream)
public Boolean LoadPdfFile(String fileName)
 
' Use this VB.NET API to specify which PDF page(s) you want to extract.
public FilePageCount As Integer
 
' Use this VB.NET API to output extracted PDF text to a String Object.
public String ConvertToText(Integer pageIndex)
public ConvertToText() As String
 
' Use this VB.NET API to transform and convert PDF file to a txt file.
public void ConvertToTextFile(String fileName)
USE VB.NET CODE TO CONVERT PDF TO TXT FILE
To have a quick evaluation of our .NET PDF to text converter library, you can directly use the following VB.NET sample code to transform and convert PDF to txt file.
Module ConvertPDFtoTextFileinVBNET
       Sub Main()
           ' Create an instance of PDF to txt converter object.
           Dim ConvertPDFtoTxt As CSPdfExtractor = New CSPdfExtractor()


           ' Load a PDF file to your VB.NET project.
           ConvertPDFtoTxt.LoadPdfFile("F:/CnetSDKTest.pdf")


           ' Render & convert PDF to text file in VB.NET project.
           ConvertPDFtoTxt.ConvertToTextFile("F:/CnetSDKTest.txt")
       End Sub
End Module

USE VB.NET CODE TO EXTRACT TEXT FROM PDF
The following VB.NET class code example shows how to recognize PDF text & extract text from PDF file page. Moreover, you can refer to VB.NET code below to extract text from whole PDF file.
Module ExtractTextfromPDFinVBNET
     Sub Main()
      ' Create an instance of PDF text extractor object.
      Dim ExtractPDFText As CSPdfExtractor = New CSPdfExtractor()


      ' Load a PDF file to your VB.NET project.
      ExtractPDFText.LoadPdfFile("F:/CnetSDKTest.pdf")


      ' Get the total page count of the PDF file.
      Dim Count As Integer = ExtractPDFText.FilePageCount
 
      Dim i As Integer
      For  i = 0 To  Count- 1  Step  i + 1
         ' Recognize and extract text from each PDF page.
         Dim PdfPageText As String = ExtractPDFText.ConvertToText(i)
         Console.WriteLine(PdfPageText)
      Next
         Console.ReadKey();


      ' Recognize and extract text from whole PDF file.  
      ' Dim AllText As String = ExtractPDFText.ConvertToText()
      ' Console.WriteLine(AllText)
    End Sub
End Module

Besides VB.NET class code example, we also provide C# class code example for your reference. Please see C# class code example PDF text extractor & PDF to text converter.