Μορφοποιημένο κείμενο
Επισκόπηση
FormattedText είναι μια κλάση στο Aspose.PDF FOSS για .NET.
Αντιπροσωπεύει μορφοποιημένο κείμενο που χρησιμοποιείται σε λειτουργίες σφραγίδωσης και επιδιόρθωσης.
Αυτή η κλάση παρέχει 26 μεθόδους για εργασία με αντικείμενα FormattedText σε προγράμματα .NET.
Διαθέσιμες μέθοδοι περιλαμβάνουν: AddNewLineText, FormattedText, IsCjk, SetCjkFontStyle.
Όλα τα δημόσια μέλη είναι προσβάσιμα σε οποιαδήποτε εφαρμογή .NET μετά την εγκατάσταση του πακέτου Aspose.PDF FOSS for .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 | Ανάγνωση | Συνολικό ύψος του μορφοποιημένου μπλοκ κειμένου (άθροισμα των υψών των γραμμών). |
Μέθοδοι
| Signature | Description |
|---|---|
FormattedText() | Δημιουργεί ένα νέο FormattedText με κενό κείμενο. |
FormattedText(text: string) | Δημιουργεί ένα νέο FormattedText με το καθορισμένο κείμενο. |
FormattedText(text: string, foregroundColor: Color, backgroundColor: Color) | Δημιουργεί ένα FormattedText με κείμενο και χρώματα προσκηνίου/παρασκηνίου. |
FormattedText(text: string, foregroundColor: FontColor) | Δημιουργεί ένα FormattedText με κείμενο και FontColor προσκηνίου/παρασκηνίου. |
FormattedText(text: string, foregroundColor: FontColor, backgroundColor: FontColor) | Δημιουργεί ένα FormattedText με κείμενο και FontColor προσκηνίου/παρασκηνίου. |
FormattedText(text: string, fontColor: FontColor, fontStyle: FontStyle, encodingType: EncodingType, embedded: bool, textSize: float) | Δημιουργεί ένα FormattedText με πλήρη μορφοποίηση χρησιμοποιώντας FontColor. |
FormattedText(text: string, textColor: FontColor, backColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float) | Δημιουργεί ένα FormattedText με πλήρη μορφοποίηση χρησιμοποιώντας FontColor με προσκηνίο και παρασκηνίο. |
FormattedText(text: string, fontColor: FontColor, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Δημιουργεί ένα FormattedText με πλήρη μορφοποίηση χρησιμοποιώντας FontColor, με διάστιχο. |
FormattedText(text: string, textColor: Color, backColor: Color, fontName: string, textEncoding: EncodingType, embedded: bool, fontSize: float) | Δημιουργεί ένα FormattedText με System.Drawing.Color προσκηνίου/παρασκηνίου και ρυθμίσεις γραμματοσειράς. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, encoding: EncodingType, embedded: bool, textSize: float) | Δημιουργεί ένα FormattedText με System.Drawing.Color προσκηνίου/παρασκηνίου και FontStyle. |
FormattedText(text: string, textColor: Color, backColor: Color, textFont: FontStyle, textEncoding: EncodingType, embedded: bool, textSize: float, lineSpacing: float) | Καλεί το FormattedText σε αυτήν την παρουσία 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 προσκηνίου + ζεύγος προσκηνίου/παρασκηνίου. |
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) | Δημιουργεί ένα FormattedText με System.Drawing.Color προσκηνίου και όνομα γραμματοσειράς ή αρχείο γραμματοσειράς TrueType. |
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). |