FormattedText

FormattedText

Overview

FormattedText เป็นคลาสใน Aspose.PDF FOSS สําหรับ Java.

แสดงข้อความที่จัดรูปแบบด้วยตัวอักษร สี และคุณสมบัติการโคด ใช้เป็นหลักสําหรับตราใน API หน้าผิวหน้า.

หมวดนี้ให้ 22 วิธีในการทํางานกับวัตถุ FormattedText ในโปรแกรม Java. วิธีการที่ใช้ได้แก่: FormattedText, addNewLineText, getBackColor, getEncoding, getFirstLine, getFontName, getFontSize, getFontStyle, getLineSpacing, getText, getTextColor, isEmbedded,และ 1 วิธีการเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Java ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Java. คุณสมบัติ: backColor, embedded, encoding, firstLine, fontName, fontSize,และอีก 4 คน.

Properties

NameTypeAccessDescription
firstLineStringReadกลับบรรทัดแรกของข้อความ หรือเส้นว่างถ้าไม่มีข้อเขียนที่กําหนดไว้.
textStringReadกลับข้อความทุกแถวที่เข้ากับตัวอักษรใหม่.
textColorColorReadส่งสีพื้นหน้า (ข้อความ) กลับ.
backColorColorReadส่งสีพื้นหลังกลับ.
fontNameStringReadส่งชื่อตัวอักษรกลับ.
fontSizefloatReadส่งผลขนาดตัวอักษรในจุด.
embeddedbooleanReadกลับความต้องการให้มีตัวอักษรใน PDF.
fontStyleFontStyleReadกลับรูปแบบตัวอักษรที่กําหนดไว้ก่อน.
encodingEncodingTypeReadกลับชนิดการรหัส.
lineSpacingfloatReadกลับความห่างของเส้นในจุด.

Methods

SignatureDescription
FormattedText()สร้างตัวอย่าง {@code FormattedText} ที่ว่างเปล่า.
FormattedText(text: String)สร้าง {@code FormattedText} กับข้อความที่ให้.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color)สร้าง {@code FormattedText} ด้วยสีพื้นหน้าและหลัง.
FormattedText(text: String, color: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสี, รูปแบบตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, color: Color, fontName: String, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสี, ชื่อตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, รูปแบบตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontName: String, encoding: EncodingType, embedded: boolean, fontSize: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, ชื่อตัวอักษร, การโค้ดและขนาด.
FormattedText(text: String, color: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float, lineSpacing: float)สร้าง {@code FormattedText} ด้วยสี, รูปแบบตัวอักษร, การโค้ด, ขนาด และระยะทางเส้น.
FormattedText(text: String, foregroundColor: Color, backgroundColor: Color, fontStyle: FontStyle, encoding: EncodingType, embedded: boolean, fontSize: float, lineSpacing: float)สร้าง {@code FormattedText} ด้วยสีหน้า / หลัง, รูปแบบตัวอักษร, การโค้ด, ขนาดและระยะทางเส้น.
addNewLineText(text: String)เพิ่มบรรทัดใหม่ของข้อความ.
addNewLineText(text: String, lineSpacing: float)เพิ่มบรรทัดใหม่ของข้อความที่มีระยะทางเส้นที่กําหนดเอง.
getFirstLine()Stringกลับบรรทัดแรกของข้อความ หรือเส้นว่างถ้าไม่มีข้อเขียนที่กําหนดไว้.
getText()Stringกลับข้อความทุกแถวที่เข้ากับตัวอักษรใหม่.
getTextColor()Colorส่งสีพื้นหน้า (ข้อความ) กลับ.
getBackColor()Colorส่งสีพื้นหลังกลับ.
getFontName()Stringส่งชื่อตัวอักษรกลับ.
getFontSize()floatส่งผลขนาดตัวอักษรในจุด.
isEmbedded()booleanกลับความต้องการให้มีตัวอักษรใน PDF.
getFontStyle()FontStyleกลับรูปแบบตัวอักษรที่กําหนดไว้ก่อน.
getEncoding()EncodingTypeกลับชนิดการรหัส.
getLineSpacing()floatกลับความห่างของเส้นในจุด.
toString()String

See Also

 ภาษาไทย