Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

word interop embed fonts when converting to pdf c#

I am using the following to save word to pdf:

private Microsoft.Office.Interop.Word.Application _wordApp;

_wordApp.ActiveDocument.EmbedTrueTypeFonts = true;
_wordApp.ActiveDocument.SaveAs2(MergedDocumentFullOutputPath, Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF);

I am able to save as pdf but few fonts are not embedding. I want to embed the system fonts too if possible.

like image 573
Shanky Avatar asked Nov 22 '25 17:11

Shanky


1 Answers

Word 2013-2016 does not support font embedding using Open Type Fonts (.otf) or other formats, it only fully supports it using TrueType Fonts (.ttf).

To fix the problem, all you have to do is follow this simple steps:

  1. Convert the font to .ttf using a converter. I used this website Online Font Converter.
  2. Install the converted files. You will be prompted that the font is already install, choose "yes" to replace the old installation.
  3. Enjoy :)
like image 129
DomDev Avatar answered Nov 25 '25 06:11

DomDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!