Hello,
Hi Ali.
Hi Ali,
//open document<o:p></o:p>
Document pdfDocument = new Document(“input.pdf”);<o:p></o:p>
//create TextAbsorber object to extract
text<o:p></o:p>
TextAbsorber textAbsorber = new TextAbsorber(new TextExtractionOptions(TextExtractionOptions.TextFormattingMode.Pure));<o:p></o:p>
//accept the absorber for all the pages<o:p></o:p>
pdfDocument.Pages.Accept(textAbsorber);<o:p></o:p>
//get the extracted text<o:p></o:p>
string extractedText = textAbsorber.Text;<o:p></o:p>
// create a writer and open the file<o:p></o:p>
TextWriter tw = new
StreamWriter(“extracted-text.txt”);<o:p></o:p>
// write a line of text to the file<o:p></o:p>
tw.WriteLine(extractedText);<o:p></o:p>
// close the stream<o:p></o:p>
tw.Close();<o:p></o:p>
Please feel free to contact us for any further assistance.
Best Regards,