添加文字輪廓
使用 IronWord 為文字添加輪廓非常簡單。 儘管它很簡單,但每個文字輪廓的屬性都可以調整以滿足每一個需求。 一旦匯入 Word 文件,便會透過將 TextOutlineEffect.DefaultEffect 指派給新的 TextEffect 實例的 TextOutlineEffect 屬性,來配置 textStyle 以包含文字輪廓效果。 此效果可以應用於所需的任意多的文本。 文件最終被導出。 如需更多範例和示範,請瀏覽以下文章:如何為文字添加文字輪廓效果。
using IronWord;
using IronWord.Models;
// Create new Word document
WordDocument doc = new WordDocument();
// Create and configure text style
TextStyle textStyle = new TextStyle();
textStyle.TextEffect = new TextEffect()
{
TextOutlineEffect = TextOutlineEffect.DefaultEffect,
};
// Add text with style
doc.AddText("Hello World").Style = textStyle;
// Export new Word document
doc.SaveAs("textOutlineEffect.docx");Imports IronWord
Imports IronWord.Models
' Create new Word document
Private doc As New WordDocument()
' Create and configure text style
Private textStyle As New TextStyle()
textStyle.TextEffect = New TextEffect() With {.TextOutlineEffect = TextOutlineEffect.DefaultEffect}
' Add text with style
doc.AddText("Hello World").Style = textStyle
' Export new Word document
doc.SaveAs("textOutlineEffect.docx")Install-Package IronWord
使用 IronWord 為文字添加輪廓非常簡單。 儘管它很簡單,但每個文字輪廓的屬性都可以調整以滿足每一個需求。 一旦匯入 Word 文件,便會透過將 TextOutlineEffect.DefaultEffect 指派給新的 TextEffect 實例的 TextOutlineEffect 屬性,來配置 textStyle 以包含文字輪廓效果。 此效果可以應用於所需的任意多的文本。 文件最終被導出。 如需更多範例和示範,請瀏覽以下文章:如何為文字添加文字輪廓效果。