I'm using following code:
- Code: Select all
using Spire.Pdf;
using Spire.Pdf.Texts;
void test()
{
try
{
var fPath = @"C:\Temp\test_2.pdf";
byte[] data = File.ReadAllBytes(fPath);
using PdfDocument doc = new(data);
var page = doc.Pages[0];
PdfTextFinder textFinder = new(page);
List<PdfTextFragment> txtList = textFinder.FindAllText(); // here exception occures
txtList.ForEach(Console.WriteLine);
}
catch (Exception ex)
{
Diag.AddException(ex, pdfFile);
}
}
Spire.Pdf.Texts.PdfTextFinder.FindAllText() yields exception:
System.Exception: illegal Subtype "Type2" in font dictionary.
at spr궑.옛(sprⓉ A_0)
at spr궑.옛(sprⓉ A_0, spr겐 A_1)
at spr莧.옛(sprⓉ A_0)
at sprꃄ.픪(spr嘻 A_0)
at sprꃄ.턦()
at sprꋆ.옛(spr圼 A_0)
at sprꋆ.옛()
at sprꋆ..ctor(PdfPageBase A_0, spr鳀 A_1)
at Spire.Pdf.Texts.PdfTextFinder.옛()
at Spire.Pdf.Texts.PdfTextFinder.FindAllText()
I'm using Spire.Office for .NET 8.12.2.
Is this issue already resolved in newest version?
Regards, Brane