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.

Mon Apr 09, 2018 3:42 am

Hi,

I have been using the free version for reading the text from pdf files. It worked OK with a few pdf files except a particular one (please see attachment).

The Code I used:

Code: Select all
var sb = new StringBuilder();

var doc = new PdfDocument();
doc.LoadFromFile(filePath);

foreach (PdfPageBase page in doc.Pages)
{
       sb.Append(page.ExtractText()); //it throws exception here
}

doc.Close();


The exception I got:

Code: Select all
System.ArgumentException
  HResult=0x80070057
  Message=Parameter is not valid.
  Source=System.Drawing
  StackTrace:
   at System.Drawing.Drawing2D.GraphicsPath.GetLastPoint()
   at Spire.Pdf.General.Render.Font.Type1CFont.ᜀ(ᜀ A_0, GraphicsPath A_1, FlPoint A_2)
   at Spire.Pdf.General.Render.Font.Type1CFont.ᜀ(Int32 A_0, Int32 A_1)
   at Spire.Pdf.General.Render.Font.OutlineFont.GetGlyph(Char src, String name, TypeEncodingCmap type)
   at Spire.Pdf.General.Render.Font.PDFFontViewer.GetCachedGlyph(Char src, String name, TypeEncodingCmap type)
   at Spire.Pdf.General.Render.Font.PDFFontEncoding.GetGlyphs(PDFFontViewer font, String text)
   at Spire.Pdf.General.Render.Font.PDFFontViewer.GetGlyphs(String text)
   at sprᷧ.ᜀ(String A_0, Single A_1, Single A_2)
   at Spire.Pdf.PdfPageBase.ᜀ(sprᩘ A_0, PdfPageResources A_1, Boolean A_2)
   at Spire.Pdf.PdfPageBase.ExtractText(Boolean keepWhiteSpace)



Thanks,
Steve

bettercells
 
Posts: 2
Joined: Mon Apr 09, 2018 3:32 am

Mon Apr 09, 2018 6:28 am

Hello,

Thank yor for contacting us.
I have noticed the issue and posted it to our Dev team for investigating and fixing. We will keep you updated if there is any progress. Sorry for the inconvenience caused.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Tue Apr 10, 2018 3:58 am

Hi Nina,

Is there any update?


Thanks,
Steve

bettercells
 
Posts: 2
Joined: Mon Apr 09, 2018 3:32 am

Tue Apr 10, 2018 6:50 am

Hello,

Sorry your reported issue is not resolved due to other priority issues. However we have urged our Dev team and will keep you informed regarding any available updates.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Mon Dec 16, 2019 9:37 am

Hi,

Thanks for your patient waiting.
Your reported issue has been fixed, welcome to downdload the hotfix Spire.PDF Pack(Hot Fix) Version:5.12.15 from the following link.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/5.12.15

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF

cron