FormattedText
Opinie generală
FormattedText este o clasă în Aspose.PDF FOSS pentru .NET.
Reprezintă textul formatat utilizat în operațiunile de ștampilare și reparare.
Această clasă oferă 26 de metode pentru a lucra cu obiecte FormattedText în programe .NET. Metodele disponibile includ: AddNewLineText, FormattedText, IsCjk, SetCjkFontStyle. Toți membrii publicului sunt accesibili oricărei aplicații .NET după instalarea pachetului Aspose.PDF FOSS for .Net. Proprietăți: BackgroundColor, CustomFontFile, FontName, FontSize, ForegroundColor, IsEmbedded, şi încă 3 .
Proprietăți
| Numele de proprietate | Tipul de vehicul | Accesul | Descriere: |
|---|---|---|---|
Text | string | Citeşte. | Primul text al liniei. |
FontSize | double | Citire/scriere | Dimensiunea fontului în puncte. |
FontName | string | Citire/scriere | Numele fontului (numele de bază PDF). |
ForegroundColor | Color | Citire/scriere | Culoarea textului de fond. |
BackgroundColor | Color | Citire/scriere | Culoarea de fond. |
IsEmbedded | bool | Citire/scriere | Dacă textul este încorporat (pentru fonturile nestandard). |
CustomFontFile | string? | Citire/scriere | Calea fișierului de font personalizat (pentru încorporarea fontelor TrueType). |
TextWidth | float | Citeşte. | Lățimea celei mai lungi linii la fontul/dimensiunea configurată. |
TextHeight | float | Citeşte. | Înălțimea totală a blocului de text formatat (suma înălţimilor liniilor). |
Metode de evaluare
| Semnătura | Descriere: |
|---|---|
FormattedText() | Creează un nou FormattedText cu text gol. |
FormattedText(text: string) | Creează un nou FormattedText cu textul specificat. |
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color) | Creează un FormattedText cu text și culori de fundal / fond. |
FormattedText(text: string, foregroundColor: FontColor) | Crearea unui FormattedText cu text și FontColor în prim plan / fundal. |
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor) | Crearea unui FormattedText cu text și FontColor în prim plan / fundal. |
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float) | Creați un FormattedText cu formatare completă folosind FontColor. |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | Creați un FormattedText cu formatare completă folosind FontColor în prim plan și fundal. |
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Crearea unui FormattedText cu formatare completă folosind FontColor, cu spațiu între linii. |
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Creează un FormattedText cu setări de font și în față / fundal. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | Creează un FormattedText cu System.Drawing.Color în prim plan / fundal și FontStyle. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Chema FormattedText pe această instanță FormattedText. |
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) | Creați un FormattedText cu System.Drawing.Color în prim plan și un nume de font sau fișier de tip TrueType. |
FormattedText(text: string, textColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Creați un FormattedText cu Aspose.Pdf.Color în prim plan și un nume de font sau fișier de tip TrueType. |
FormattedText(text: string, color: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | Creați un FormattedText cu FontStyle (enum) și System.Drawing.Color. |
FormattedText(text: string, textColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Creează un FormattedText cu Aspose.Pdf.Color în prim plan / fundal și o distanță de linie. |
AddNewLineText(newLineText: string) | Adăugaţi o linie nouă de text. |
AddNewLineText(newLineText: string, lineSpacing: float) | Adăugați o linie nouă de text cu spațiu personalizat. |
IsCjk() | Verificați dacă textul conține caractere CJK. |
SetCjkFontStyle() | Setarea fontului la un CJK-capabil de tip (MS Gothic echivalent). |