Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

I want to extract text from PDF but failed. Does your product extract it.

$
0
0

Hi,

 

I copied the dll to bin folder and then the code works. But it cannot

retrieve the text as desired. I want to extract text from PDF but failed. Does your product

extract it. If yes then let us know. 

 

            Document pdfDocument = new Document(@"C:\AA\Maval_Puravani2\Test\A2050015.pdf");

            //create TextAbsorber object to extract text

            TextAbsorber textAbsorber = new TextAbsorber();

            //accept the absorber for all the pages

            pdfDocument.Pages.Accept(textAbsorber);

            //get the extracted text

            string extractedText = textAbsorber.Text;

            // create a writer and open the file

            TextWriter tw = new StreamWriter(@"C:\AA\Maval_Puravani2\Test\extracted-text.txt");

            // write a line of text to the file

            tw.WriteLine(extractedText);

            // close the stream

            tw.Close();

 

This gives output as following

 

Evaluation Only. Created with Aspose.Pdf. 

 

So I cannot test if your component extracts correct text from the PDF.

 

thx,

M.Irfan.


Viewing all articles
Browse latest Browse all 3131

Trending Articles