News & Releases

Minimize
Nasosoft Component for .NET v2.8 Released - Wednesday, July 28, 2010

Nasosoft Component for .NET v2.8 has released with many improvements.

Nasosoft Component for .NET is a suite of comprehensive .NET controls, including EXCEL, PDF, and RTF document format engines, RTF to HTML, HTML to RTF, RTF to TEXT, HTML to TEXT document transform engines, Chart control, SMTP, POP3, IMAP, FTP, WebDAV internet SDK and ZIP, GZIP, TAR compression.

What's new

  • Nasosoft Excel 
    • Support reading Excel 95 file format  
    • Improved error recovery for loading unreadable excel files
  • Nasosoft Transform
    • Support Text to PDF convertion 
  • Nasosoft PDF
    • Support MeasueString
  • Many Bug fixes from v2.7

How to Download

 

PdfTextReader

   Minimize

Working with PdfTextReader Class

The PdfTextReader class is used to extract text content from pdf documents. It inherits from TextReader class, so you can use it just like an ordinary StreamReader, just feed it with pdf document, then you can use methods such as Read(), ReadLine() to read text from it.
 
The following examples extract all text content from file1.pdf and print them on screen:

[C#]

PdfTextReader reader = new PdfTextReader("file1.pdf");

string strLine = null;
while ((strLine = reader.ReadLine()) != null)
{
    Console.WriteLine(strLine);
}

reader.Close();

[VB.NET]

Dim reader As New PdfTextReader("file1.pdf")

Dim strLine As String
While (strLine = reader.ReadLine()) <> NULL
 
    Console.WriteLine(strLine);
End While

reader.Close()