نص منسق
نظرة عامة
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). |