The file name of the input document.
The file name of the output document, could be the same as the file name of the input document
The name of the font to embed.
The file name of the font to embed
True if the font file is used for a Bold or BoldItalic requested font.
True if the font file is used for a Italic or BoldItalic requested font.
Example





In This Topic

EmbedFontInDocx Method (GdPictureDocumentUtilities)

In This Topic
This method embeds a font in a .docx file.
Syntax
'Declaration

 

Public Shared Function EmbedFontInDocx( _

   ByVal inputWordFilePath As String, _

   ByVal outputWordFilePath As String, _

   ByVal fontName As String, _

   ByVal fontFilePath As String, _

   ByVal isBold As Boolean, _

   ByVal isItalic As Boolean _

) As GdPictureStatus
public static GdPictureStatus EmbedFontInDocx( 

   string inputWordFilePath,

   string outputWordFilePath,

   string fontName,

   string fontFilePath,

   bool isBold,

   bool isItalic

)
public function EmbedFontInDocx( 

    inputWordFilePath: String;

    outputWordFilePath: String;

    fontName: String;

    fontFilePath: String;

    isBold: Boolean;

    isItalic: Boolean

): GdPictureStatus; static; 
public static function EmbedFontInDocx( 

   inputWordFilePath : String,

   outputWordFilePath : String,

   fontName : String,

   fontFilePath : String,

   isBold : boolean,

   isItalic : boolean

) : GdPictureStatus;
public: static GdPictureStatus EmbedFontInDocx( 

   string* inputWordFilePath,

   string* outputWordFilePath,

   string* fontName,

   string* fontFilePath,

   bool isBold,

   bool isItalic

) 
public:

static GdPictureStatus EmbedFontInDocx( 

   String^ inputWordFilePath,

   String^ outputWordFilePath,

   String^ fontName,

   String^ fontFilePath,

   bool isBold,

   bool isItalic

) 

Parameters

inputWordFilePath
The file name of the input document.
outputWordFilePath
The file name of the output document, could be the same as the file name of the input document
fontName
The name of the font to embed.
fontFilePath
The file name of the font to embed
isBold
True if the font file is used for a Bold or BoldItalic requested font.
isItalic
True if the font file is used for a Italic or BoldItalic requested font.

Return Value

A member of the GdPictureStatus enumeration.If the method has been successfully followed, then the return value is GdPictureStatus.OK.
Example
Using gdpictureDocumentConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()

gdpictureDocumentConverter.EmbedFont(@"input_docx_missing_font.docx", @"output_docx_embedd_font.docx", @"FreeSans", @"input_font_FreeSansBoldOblique.otf", true, true)

End Using
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())

converter.EmbedFont(@"input_docx_missing_font.docx", @"output_docx_embedd_font.docx", @"FreeSans", @"input_font_FreeSansBoldOblique.otf", true, true);

}
See Also