Formatierten Text

Formatierten Text

Übersicht

FormattedText ist eine Klasse in Aspose.PDF FOSS für .NET.

Stellt formatierte Texte dar, die bei Stempel- und Reparaturvorgängen verwendet werden.

Diese Klasse bietet 26 Methoden zur Arbeit mit FormattedText-Objekten in .NET-Programmen.
Verfügbare Methoden umfassen: AddNewLineText, FormattedText, IsCjk, SetCjkFontStyle.
Alle öffentlichen Mitglieder sind für jede .NET-Anwendung nach der Installation des Aspose.PDF FOSS for .NET-Pakets zugänglich.
Eigenschaften: BackgroundColor, CustomFontFile, FontName, FontSize, ForegroundColor, IsEmbedded und 3 weitere.

Eigenschaften

NameTypZugriffBeschreibung
TextstringReadDer Textinhalt der ersten Zeile.
FontSizedoubleRead/WriteSchriftgröße in Punkten.
FontNamestringRead/WriteSchriftname (PDF-Basis-Schriftname).
ForegroundColorColorRead/WriteVordergrundfarbe (Textfarbe).
BackgroundColorColorRead/WriteHintergrundfarbe.
IsEmbeddedboolRead/WriteOb der Text eingebettet ist (für nicht standardmäßige Schriften).
CustomFontFilestring?Read/WriteBenutzerdefinierter Schriftdateipfad (für TrueType-Schrifteinbettung).
TextWidthfloatReadBreite der längsten Zeile bei der konfigurierten Schrift/Größe.
TextHeightfloatReadGesamthöhe des formatierten Textblocks (Summe der Zeilenhöhen).

Methoden

SignatureDescription
FormattedText()Erstellt ein neues FormattedText mit leerem Text.
FormattedText(text: string)Erstellt ein neues FormattedText mit dem angegebenen Text.
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color)Erstellt ein FormattedText mit Text und Vorder-/Hintergrundfarben.
FormattedText(text: string, foregroundColor: FontColor)Erstellt ein FormattedText mit Text und FontColor Vorder-/Hintergrund.
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor)Erstellt ein FormattedText mit Text und FontColor Vorder-/Hintergrund.
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float)Erstellt ein FormattedText mit vollständiger Formatierung unter Verwendung von FontColor.
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)Erstellt ein FormattedText mit vollständiger Formatierung unter Verwendung von FontColor mit Vorder- und Hintergrund.
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Erstellt ein FormattedText mit vollständiger Formatierung unter Verwendung von FontColor, mit Zeilenabstand.
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Erstellt ein FormattedText mit System.Drawing.Color Vorder-/Hintergrund und Schriftarteinstellungen.
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float)Erstellt ein FormattedText mit System.Drawing.Color Vorder-/Hintergrund und FontStyle.
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Ruft FormattedText für diese FormattedText-Instanz auf.
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 Vordergrund + Vorder-/Hintergrund-Paar.
FormattedText(text: string, color: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)System.Drawing.Color Vordergrund + FontStyle + EncodingType, kein lineSpacing.
FormattedText(text: string, textColor: System.Drawing.Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)System.Drawing.Color Vordergrund + 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 Vorder-/Hintergrund + FontStyle.
FormattedText(text: string, textColor: System.Drawing.Color, backColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)System.Drawing.Color Vorder-/Hintergrund + Schriftart-Name Zeichenkette.
FormattedText(text: string, textColor: System.Drawing.Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Erstellt ein FormattedText mit System.Drawing.Color Vordergrund und einem Schriftartnamen oder TrueType-Schriftdatei.
FormattedText(text: string, textColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float)Erstellt ein FormattedText mit Aspose.Pdf.Color Vordergrund und einem Schriftartnamen oder TrueType-Schriftdatei.
FormattedText(text: string, color: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float)Erstellt ein FormattedText mit FontStyle (Enum) und System.Drawing.Color.
FormattedText(text: string, textColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float)Erstellt ein FormattedText mit Aspose.Pdf.Color Vorder-/Hintergrund und einem Zeilenabstand.
AddNewLineText(newLineText: string)Fügt eine neue Textzeile hinzu.
AddNewLineText(newLineText: string, lineSpacing: float)Fügt eine neue Textzeile mit benutzerdefiniertem Zeilenabstand hinzu.
IsCjk()Prüft, ob der Text CJK-Zeichen enthält.
SetCjkFontStyle()Setzt die Schriftart auf eine CJK-fähige Schrift (entsprechend MS Gothic).

Siehe auch

 Deutsch