public class Text extends Object
fo:block标签
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-fop is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
| 构造器和说明 |
|---|
Text() |
| 限定符和类型 | 方法和说明 |
|---|---|
Element |
createElement(Document document)
创建元素
|
Text |
enableBorder()
开启边框(调试时使用)
|
Text |
enableDeleteLine()
开启删除线
|
Text |
enableKeepTogether()
开启分页时保持
|
Text |
enableKeepWithNext()
开启分页时与下一个元素保持
|
Text |
enableKeepWithPrevious()
开启分页时与上一个元素保持
|
Text |
enableLink()
开启超链接
|
Text |
enableUnderLine()
开启下划线
|
Text |
setBackgroundColor(String color)
设置背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Text |
setBreakAfter(String breakAfter)
设置分页符-后
auto:自动
column:分列
page:分页
even-page:在元素之后强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之后强制分页一次或两个,以便下一页将成为奇数页
|
Text |
setBreakBefore(String breakBefore)
设置分页符-前
auto:自动
column:分列
page:分页
even-page:在元素之前强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之前强制分页一次或两个,以便下一页将成为奇数页
|
Text |
setDeleteLineColor(String color)
设置删除线颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Text |
setEndIndent(String indent)
设置段后缩进
|
Text |
setFontColor(String color)
设置字体颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Text |
setFontFamily(String fontFamily)
设置字体名称
|
Text |
setFontSize(String fontSize)
设置字体大小
|
Text |
setFontSizeAdjust(String fontSizeAdjust)
设置字体大小调整
|
Text |
setFontStyle(String fontStyle)
设置字体样式
normal:正常
oblique:斜体
italic:斜体
backslant:斜体
|
Text |
setFontWeight(String fontWeight)
设置字体重量
normal:正常(400)
bold:粗体(700)
bolder:加粗(900)
lighter:细体(100)
|
Text |
setHorizontalStyle(String style)
设置水平样式
left:居左
center:居中
right:居右
justify:两端对齐
|
Text |
setId(String id)
设置id
|
Text |
setLanguage(String language)
设置文本语言
|
Text |
setLeading(String leading)
设置行间距
|
Text |
setLetterSpacing(String spacing)
设置字符间距
|
Text |
setLinkExternalDestination(String destination)
设置外部地址
注:url
|
Text |
setLinkInternalDestination(String destination)
设置内部地址
注:标签id
|
Text |
setMargin(String margin)
设置上下左右边距
|
Text |
setMarginBottom(String marginBottom)
设置下边距
|
Text |
setMarginLeft(String marginLeft)
设置左边距
|
Text |
setMarginRight(String paddingRight)
设置右边距
|
Text |
setMarginTop(String marginTop)
设置上边距
|
Text |
setPadding(String padding)
设置上下左右填充
|
Text |
setPaddingBottom(String paddingBottom)
设置下填充
|
Text |
setPaddingLeft(String paddingLeft)
设置左填充
|
Text |
setPaddingRight(String paddingRight)
设置右填充
|
Text |
setPaddingTop(String paddingTop)
设置上填充
|
Text |
setSpaceAfter(String space)
设置段后空白
|
Text |
setSpaceBefore(String space)
设置段前空白
|
Text |
setStartIndent(String indent)
设置段前缩进
|
Text |
setText(String text)
设置文本
|
Text |
setTextIndent(String indent)
设置文本缩进
|
Text |
setUnderLineColor(String color)
设置下划线颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Text |
setUnderLineWidth(String width)
设置下划线宽度
|
Text |
setVerticalStyle(String style)
设置垂直对齐(用于角标设置)
top:上对齐
bottom:下对齐
|
Text |
setWhiteSpace(String whiteSpace)
设置空白空间
normal:正常
pre:保留空格
nowrap:合并空格
|
Text |
setWhiteSpaceCollapse(String whiteSpaceCollapse)
设置空白空间折叠
true:是
false:否
|
Text |
setWordSpacing(String spacing)
设置单词间距
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendChild, createBlockElement, createBlockElement, createEmptyElement, transformpublic Text setMarginBottom(String marginBottom)
marginBottom - 下边距public Text setMarginRight(String paddingRight)
paddingRight - 右边距public Text setPaddingBottom(String paddingBottom)
paddingBottom - 下填充public Text setPaddingLeft(String paddingLeft)
paddingLeft - 左填充public Text setPaddingRight(String paddingRight)
paddingRight - 右填充public Text setLanguage(String language)
language - 语言public Text setWhiteSpace(String whiteSpace)
normal:正常
pre:保留空格
nowrap:合并空格
whiteSpace - 空白空间public Text setWhiteSpaceCollapse(String whiteSpaceCollapse)
true:是
false:否
whiteSpaceCollapse - 折叠public Text setFontStyle(String fontStyle)
normal:正常
oblique:斜体
italic:斜体
backslant:斜体
fontStyle - 字体样式public Text setFontWeight(String fontWeight)
normal:正常(400)
bold:粗体(700)
bolder:加粗(900)
lighter:细体(100)
fontWeight - 字体重量public Text setFontSizeAdjust(String fontSizeAdjust)
fontSizeAdjust - 字体大小调整public Text setFontColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color - 字体颜色public Text setHorizontalStyle(String style)
left:居左
center:居中
right:居右
justify:两端对齐
style - 水平样式public Text setVerticalStyle(String style)
top:上对齐
bottom:下对齐
style - 垂直样式public Text setLinkInternalDestination(String destination)
注:标签id
destination - 地址public Text setLinkExternalDestination(String destination)
注:url
destination - 地址public Text setDeleteLineColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color - 颜色public Text setUnderLineColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color - 颜色public Text setBreakBefore(String breakBefore)
auto:自动
column:分列
page:分页
even-page:在元素之前强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之前强制分页一次或两个,以便下一页将成为奇数页
breakBefore - 分页符public Text setBreakAfter(String breakAfter)
auto:自动
column:分列
page:分页
even-page:在元素之后强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之后强制分页一次或两个,以便下一页将成为奇数页
breakAfter - 分页符public Text setBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color - 颜色public Text enableKeepTogether()
public Text enableKeepWithPrevious()
public Text enableKeepWithNext()
public Text enableLink()
public Text enableDeleteLine()
public Text enableUnderLine()
public Text enableBorder()
Copyright © 2024. All rights reserved.