Error occuring while extract text from pdf


#1

Hi


My code will give the following errors

1.An unhandled exception of type 'System.ArgumentNullException' occurred in mscorlib.dll

Additional information: Value cannot be null.

2.An unhandled exception of type 'System.TypeInitializationException' occurred in aspose.pdf.kit.dll

Additional information: The type initializer for "xfc3c9f4b173edcf4.x9ee491ab5579b9fc" threw an exception.

Code

using System;

using Aspose.Pdf.Kit;

using System.IO;

namespace ConsoleApplication3

{

///

/// Summary description for Class1.

///

class Class1

{

///

/// The main entry point for the application.

///

[STAThread]

static void Main(string[] args)

{

//

// TODO: Add code to start application here

try

{

PdfExtractor extractor = new PdfExtractor();

extractor.Password = "";

extractor.BindPdf("one.pdf");

extractor.ExtractText();

extractor.GetText("one.txt");

}

catch(Exception ex)

{

Console.WriteLine (ex.ToString ());

}

//

}

}

}


pls give replay as well as solution assoon as possible.
bye
Renu



#2

Dear Renu,

Thank you for considering Aspose.

Can you please also provide the Pdf document and let us test it?


#3

Iam providing the ond.pdf file.


#4
ok, We will test it and reply you quickly.