FormattedText
Overview
FormattedText adalah kelas dalam Aspose.PDF FOSS untuk .NET.
Menampilkan teks yang diformat digunakan dalam operasi stamping dan mendandani.
Kelas ini menyediakan 26 metode untuk bekerja dengan objek FormattedText dalam program .NET. Metode yang tersedia meliputi: AddNewLineText, FormattedText, IsCjk, SetCjkFontStyle. Semua anggota publik dapat diakses oleh aplikasi .NET setelah menginstal paket Aspose.PDF FOSS for .Net. Sifatnya: BackgroundColor, CustomFontFile, FontName, FontSize, ForegroundColor, IsEmbedded, dan 3 lagi.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Text | string | Read | Isi teks baris pertama. |
FontSize | double | Membaca/menulis | Ukuran font dalam poin. |
FontName | string | Membaca/menulis | Nama font (nama font dasar PDF). |
ForegroundColor | Color | Membaca/menulis | Warna latar depan (teks). |
BackgroundColor | Color | Membaca/menulis | Warna latar belakang. |
IsEmbedded | bool | Membaca/menulis | Apakah teks tertanam (untuk font non-standar). |
CustomFontFile | string? | Membaca/menulis | Jalur file font kustom (untuk pemasangan TrueType font). |
TextWidth | float | Read | Lebar baris terpanjang pada font/ukuran yang dikonfigurasi. |
TextHeight | float | Read | Total tinggi blok teks yang diformat (jumlah dari ketinggian baris). |
Methods
| Signature | Description |
|---|---|
FormattedText() | Buat FormattedText baru dengan teks kosong. |
FormattedText(text: string) | Buat FormattedText baru dengan teks yang ditentukan. |
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color) | Buat FormattedText dengan teks dan warna latar depan/background. |
FormattedText(text: string, foregroundColor: FontColor) | Buat FormattedText dengan teks dan FontColor latar depan/background. |
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor) | Buat FormattedText dengan teks dan FontColor latar depan/background. |
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float) | Buat FormattedText dengan pemformatan penuh menggunakan FontColor. |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | Buat FormattedText dengan pemformatan penuh menggunakan FontColor yang memiliki latar depan dan belakang. |
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Buat FormattedText dengan pemformatan penuh menggunakan FontColor, dengan jarak baris. |
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Buat FormattedText dengan setelan font dan latar depan. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | Buat FormattedText dengan System.Drawing.Color di depan / latar belakang dan FontStyle. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Menelpon FormattedText pada instance FormattedText ini. |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color) | System.Drawing.Color foreground + foreground/background pair. |
FormattedText(text: string, color: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | System.Drawing.Color foreground + FontStyle + EncodingType, no lineSpacing. |
FormattedText(text: string, textColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | System.Drawing.Color foreground + FontStyle + EncodingType + lineSpacing. |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | System.Drawing.Color foreground/background + FontStyle. |
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | System.Drawing.Color foreground/background + font-name string. |
FormattedText(text: string, textColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Buat file font FormattedText dengan latar depan dan nama fon atau file fon. |
FormattedText(text: string, textColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Buat file font FormattedText dengan latar depan dan nama fon atau file fon. |
FormattedText(text: string, color: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | Buat FormattedText dengan FontStyle (enum) dan System.Drawing.Color. |
FormattedText(text: string, textColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Buat FormattedText dengan Aspose.Pdf.Color latar depan / latar belakang dan jarak garis. |
AddNewLineText(newLineText: string) | Tambahkan baris teks baru. |
AddNewLineText(newLineText: string, lineSpacing: float) | Tambahkan baris teks baru dengan jarak garis khusus. |
IsCjk() | Periksa apakah teks berisi karakter CJK. |
SetCjkFontStyle() | Tetapkan font ke CJK-capable font (MS Gothic setara). |