Welcome to the ASP.NET Core feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET Core, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi,
On using ExtractText with the out parameter, it throws an Format exception.

System.FormatException: String must be exactly one character long.

   at System.Convert.ToChar(String value, IFormatProvider provider)

   at Syncfusion.Pdf.PdfPageBase.ExtractText(TextLineCollection& textLineCollection)

   at ORATestProjects.Program.Main(String[] args)

// use attached file
string file = "article.pdf";
try
{
  PdfLoadedDocument document = new PdfLoadedDocument(new FileStream( file, FileMode.Open, FileAccess.Read));
  foreach (PdfLoadedPage page in document.Pages)
  {
    page.ExtractText(out _);
  }
}
catch (Exception e)
{
  Console.WriteLine($"Error in extraction\n{e}");
}