FormattedText

FormattedText

Przegląd

FormattedText jest klasą w Aspose.PDF FOSS dla .NET.

Reprezentuje sformatowany tekst używany w operacjach stamp i mend.

Ta klasa udostępnia 26 metod do pracy z obiektami FormattedText w programach .NET. Dostępne metody to: AddNewLineText, FormattedText, IsCjk, SetCjkFontStyle. Wszystkie publiczne członki są dostępne dla każdej aplikacji .NET po zainstalowaniu pakietu Aspose.PDF FOSS dla .NET. Właściwości: BackgroundColor, CustomFontFile, FontName, FontSize, ForegroundColor, IsEmbedded oraz 3 dodatkowe.

Właściwości

NazwaTypDostępOpis
TextstringOdczytTreść tekstu pierwszej linii.
FontSizedoubleOdczyt/zapisRozmiar czcionki w punktach.
FontNamestringOdczyt/zapisNaza czcionki (nazwa bazowej czcionki PDF).
ForegroundColorColorOdczyt/zapisKolor pierwszego planu (tekst).
BackgroundColorColorOdczyt/zapisKolor tła.
IsEmbeddedboolOdczyt/zapisCzy tekst jest osadzony (dla niestandardowych czcionek).
CustomFontFilestring?Odczyt/zapisŚcieżka do własnego pliku czcionki (dla osadzania czcionki TrueType).
TextWidthfloatOdczytSzerokość przyrostowa tekstu przy bieżącej czcionce i rozmiarze, w punktach.
TextHeightfloatOdczytWysokość sformatowanego tekstu, w punktach.

Metody

SygnaturaOpis
FormattedText()Utwórz nowy FormattedText z pustym tekstem.
FormattedText(text: string)Utwórz nowy FormattedText z określonym tekstem.
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color)Utwórz FormattedText z tekstem i kolorami pierwszego planu/tła.
FormattedText(text: string, foregroundColor: FontColor)Utwórz FormattedText z tekstem i FontColor pierwszego planu/tła.
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor)Utwórz FormattedText z tekstem i FontColor pierwszego planu/tła.
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float)Utwórz FormattedText z pełnym formatowaniem przy użyciu FontColor.
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)Utwórz FormattedText z pełnym formatowaniem przy użyciu FontColor z pierwszym planem i tłem.
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Utwórz FormattedText z pełnym formatowaniem przy użyciu FontColor, z odstępem między wierszami.
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Utwórz FormattedText z System.Drawing.Color pierwszym planem/tłem oraz ustawieniami czcionki.
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float)Utwórz FormattedText z System.Drawing.Color pierwszym planem/tłem oraz FontStyle.
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Wywołuje FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) na tej instancji FormattedText.
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Wywołuje FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) na tej instancji FormattedText.
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Wywołuje FormattedText(text, textColor, backColor, textFont, textEncoding, embedded, textSize, lineSpacing) na tej instancji FormattedText.
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color)System.Drawing.Color pierwszoplanowy + para pierwszoplanowy/tło.
FormattedText(text: string, color: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)System.Drawing.Color pierwszoplanowy + FontStyle + EncodingType, bez lineSpacing.
FormattedText(text: string, textColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)System.Drawing.Color pierwszoplanowy + FontStyle + EncodingType + odstęp linii.
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float)System.Drawing.Color pierwszy plan/tło + FontStyle.
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)System.Drawing.Color pierwszy plan/tło + ciąg nazwy czcionki.
FormattedText(text: string, textColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Utwórz FormattedText z System.Drawing.Color pierwszoplanowym oraz nazwą czcionki lub plikiem czcionki TrueType.
FormattedText(text: string, textColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Utwórz FormattedText z Aspose.Pdf.Color pierwszym planem i nazwą czcionki lub plikiem czcionki TrueType.
FormattedText(text: string, color: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)Utwórz FormattedText z FontStyle (enum) i System.Drawing.Color.
FormattedText(text: string, textColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Utwórz FormattedText z Aspose.Pdf.Color pierwszym planem/tłem oraz odstępem między wierszami.
AddNewLineText(newLineText: string)Dodaj nową linię tekstu.
AddNewLineText(newLineText: string, lineSpacing: float)Dodaj nową linię tekstu z niestandardowym odstępem między wierszami.
IsCjk()Sprawdź, czy tekst zawiera znaki CJK.
SetCjkFontStyle()Ustaw czcionkę na czcionkę obsługującą CJK (odpowiednik MS Gothic).

Zobacz także

 Polski