Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Jan 04, 2017 11:05 am
Hi Spire team,
I tried to create sample to extract text from pdf.When extractText method ,this doest return any value and waits for ever ,struck there for some pdfs ,for few pdfs works fine
- Code: Select all
public static string parsePDFText(string file)
{
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
string Value = string.Empty;
try
{
StringBuilder buffer = new StringBuilder();
try
{
doc.LoadFromFile(file);
foreach (PdfPageBase page in doc.Pages)
{
buffer.Append(page.ExtractText());//this waits for ever
}
}
finally
{
doc.Close();
}
Value = buffer.ToString();
}
catch
{ }
return Value;
}
-

sureshcse29
-
- Posts: 1
- Joined: Wed Aug 19, 2015 7:53 pm
Thu Jan 05, 2017 2:31 am
Dear sureshcse29,
Thanks for your inquiry.
If you are using older version of Spire.PDF, we first suggest upgrading to the latest
Spire.PDF Pack(Hot Fix) Version:3.8.121. After trying this version, if the problem still persists, please provide us those files which encounter issues for further investigation.
Thanks,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Fri Jan 13, 2017 8:49 am
Dear sureshcse29,
Did you test the latest version ? Has the issue been resolved ?
If not, please provide us sample file for further investigation.
Thanks,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am