Hello Kevin,
Greetings from E-iceblue.
Could you let us know how is the issue going? Thanks in advance for your valuable feedback and time.
Sincerely,
Lisa
E-iceblue support team
pdf.LoadFromStream(file.InputStream);
PdfUsedFont[] fonts = pdf.UsedFonts; // this return null
if (fonts.Length > 0)
{
mf = fonts.GroupBy(v => v.Size)
.OrderByDescending(g => g.Count())
.First()
.Key;
PdfFont font = new PdfFont(PdfFontFamily.TimesRoman, mf, PdfFontStyle.Regular);
foreach (PdfUsedFont f in fonts)
{
try
{
f.Replace(font);
}
catch (Exception ex)
{
continue;
}
}
}
pdf.SaveToStream(s, Spire.Pdf.FileFormat.DOCX);