Hi, I try to replace font in a pdf file with c#, but it shows "The font being replaced is not a standard font of Type 1 font or a non-embeded TrueType font" .
source code:
Spire.Pdf.Graphics.Fonts.PdfUsedFont[] fonts = doc.UsedFonts;
Spire.Pdf.Graphics.PdfFont newfont = new Spire.Pdf.Graphics.PdfFont(PdfFontFamily.TimesRoman, 30f);
foreach (Spire.Pdf.Graphics.Fonts.PdfUsedFont font in fonts)
{
font.Replace(newfont); //the error occurs here!!!
}
usedfonts:
Name "Lucida Console" string
Size 9.99597 float
Style Regular Spire.Pdf.Graphics.PdfFontStyle
Type TrueTypeEmbedded Spire.Pdf.Graphics.PdfFontType
非公共成员
ActualFontName "R14" string
InternalFont {Spire.Pdf.Graphics.PdfTrueTypeFont} Spire.Pdf.Graphics.PdfFontBase {Spire.Pdf.Graphics.PdfTrueTypeFont}
ᜀ "Lucida Console" string
ᜁ 9.99597 float
ᜂ Regular Spire.Pdf.Graphics.PdfFontStyle
ᜃ TrueTypeEmbedded Spire.Pdf.Graphics.PdfFontType
ᜄ {Spire.Pdf.Graphics.PdfTrueTypeFont} Spire.Pdf.Graphics.PdfFontBase {Spire.Pdf.Graphics.PdfTrueTypeFont}
ᜅ {Spire.Pdf.PdfPageWidget} Spire.Pdf.PdfPageWidget
ᜆ "R14" string
Can you help me?