We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ExtractText method not working

Hi, I’m using Pdf.Kit to extract text from pdf files. It works for some files, but for others it gives me nothing but NewLine characters

I’ve attached a pdf that can be used to repro
I’m using Aspose.Pdf.Kit version 3.4.0 in .NET

Here is my code:
FileInfo fileInfo = new FileInfo( @“c:\suiteM.pdf” );
using( FileStream fileStream = fileInfo.OpenRead() ) {
using( MemoryStream memStream = new MemoryStream() ) {

PdfExtractor extractor = new PdfExtractor();
extractor.BindPdf( fileStream );

// I’ve tried both 1 and 0
extractor.ExtractTextMode = 1;
extractor.GetText( memStream );
memStream.Position = 0;

using( StreamReader reader = new StreamReader( memStream ) ) {
string text = reader.ReadToEnd();
Console.Write( text );

Hi Brian,

I have tested the issue using the supplied file, but I'm getting a different error at my end "Wrong text extracting, please check your pdf". Are you getting this same error?

Also, please share your system specifications on which you're having issues.

We're sorry for the inconvenience.


Hi Shahzad, thanks for the quick response. Not sure why I’m not seeing the error you are, though I have seen that error message before

System specs:
Visual Studio 2008
.NET 3.5 sp1
Aspose.Pdf.Kit 3.4.0
Windows XP with Service Pack 2
dual core 2 GHZ

Let me know if you need more info


Hi Brian,

Thanks for sharing the details. I'll test the issue using the given specifications and will update you the earliest possible.


Hi Brian,

I have reproduced and logged this issue as PDFKITNET-9382 in our issue tracking system. Our team will be looking into the matter and you'll be updated via this forum as the issue is resolved.

We're sorry for the inconvenience.


The issues you have found earlier (filed as 9382) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.