FormattedText
概要
FormattedText は Aspose.PDF の FOSS における .NET 用のクラスです。
スタンプおよびメンド操作で使用される書式化テキストを表します。
このクラスは .NET プログラム内で FormattedText オブジェクトを操作するための 26 のメソッドを提供します。利用可能なメソッドは AddNewLineText、FormattedText、IsCjk、SetCjkFontStyle です。Aspose.PDF の .NET 用 FOSS パッケージをインストールすれば、すべての公開メンバーは任意の .NET アプリケーションからアクセス可能です。プロパティ: BackgroundColor、CustomFontFile、FontName、FontSize、ForegroundColor、IsEmbedded、その他 3 つ。
プロパティ
| 名前 | 型 | アクセス | 説明 |
|---|---|---|---|
Text | string | 読み取り | 最初の行のテキスト内容。 |
FontSize | double | 読み取り/書き込み | ポイント単位のフォントサイズ。 |
FontName | string | 読み取り/書き込み | フォント名(PDFベースフォント名)。 |
ForegroundColor | Color | 読み取り/書き込み | 前景(テキスト)色。 |
BackgroundColor | Color | 読み取り/書き込み | 背景色。 |
IsEmbedded | bool | 読み取り/書き込み | テキストが埋め込まれているか(非標準フォントの場合)。 |
CustomFontFile | string? | 読み取り/書き込み | カスタムフォントファイルのパス(TrueType フォント埋め込み用)。 |
TextWidth | float | 読み取り | 現在のフォントとサイズにおけるテキストの前進幅(ポイント単位)。 |
TextHeight | float | 読み取り | 書式設定されたテキストの高さ(ポイント単位)。 |
メソッド
| シグネチャ | 説明 |
|---|---|
FormattedText() | 空のテキストで新しいFormattedTextを作成する。 |
FormattedText(text: string) | 指定されたテキストで新しいFormattedTextを作成する。 |
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color) | テキストと前景/背景色で FormattedText を作成します。 |
FormattedText(text: string, foregroundColor: FontColor) | テキストと FontColor 前景/背景で FormattedText を作成します。 |
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor) | テキストと FontColor 前景/背景で FormattedText を作成します。 |
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float) | FontColor を使用して、完全な書式設定の FormattedText を作成します。 |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | 前景と背景を使用して、FontColorで完全な書式設定のFormattedTextを作成します. |
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | 行間を設定して、FontColorで完全な書式設定のFormattedTextを作成します. |
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | System.Drawing.Colorの前景/背景とフォント設定でFormattedTextを作成します. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | System.Drawing.Colorの前景/背景とFontStyleでFormattedTextを作成します. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | この FormattedText インスタンス上で FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) を呼び出します。 |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | この FormattedText インスタンスで FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) を呼び出します。 |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | この FormattedText インスタンスで FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) を呼び出します。 |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color) | System.Drawing.Color 前景 + 前景/背景 ペア。 |
FormattedText(text: string, color: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | System.Drawing.Color 前景 + FontStyle + EncodingType、行間なし。 |
FormattedText(text: string, textColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | System.Drawing.Color 前景 + FontStyle + EncodingType + 行間。 |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | System.Drawing.Color 前景/背景 + FontStyle。 |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | System.Drawing.Color 前景/背景 + フォント名文字列。 |
FormattedText(text: string, textColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | System.Drawing.Color 前景とフォント名または TrueType フォントファイルを使用した FormattedText を作成する。 |
FormattedText(text: string, textColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | FormattedText を作成し、Aspose.Pdf.Color 前景とフォント名または TrueType フォントファイルを指定します。 |
FormattedText(text: string, color: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | FormattedText を作成し、FontStyle(enum)と System.Drawing.Color を設定します。 |
FormattedText(text: string, textColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | FormattedText を作成し、Aspose.Pdf.Color 前景/背景と行間を設定します。 |
AddNewLineText(newLineText: string) | 新しいテキスト行を追加します。 |
AddNewLineText(newLineText: string, lineSpacing: float) | カスタム行間で新しいテキスト行を追加します。 |
IsCjk() | テキストにCJK文字が含まれているか確認します。 |
SetCjkFontStyle() | フォントを CJK 対応フォント(MS Gothic 相当)に設定してください。 |