public class Barcode extends Object implements Component
fo:barcode
Copyright (c) 2020 xsx All Rights Reserved. gitee is licensed under the 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.
Constructor and Description |
---|
Barcode() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendChild, createBlockElement, createBlockElement, createEmptyElement, transform
public Barcode setMarginTop(String marginTop)
marginTop
- 上边距public Barcode setMarginBottom(String marginBottom)
marginBottom
- 下边距public Barcode setMarginLeft(String marginLeft)
marginLeft
- 左边距public Barcode setMarginRight(String paddingRight)
paddingRight
- 右边距public Barcode setPadding(String padding)
padding
- 填充public Barcode setPaddingTop(String paddingTop)
paddingTop
- 上填充public Barcode setPaddingBottom(String paddingBottom)
paddingBottom
- 下填充public Barcode setPaddingLeft(String paddingLeft)
paddingLeft
- 左填充public Barcode setPaddingRight(String paddingRight)
paddingRight
- 右填充public Barcode setType(String type)
一维码:
codabar:库德巴码
code_39:标准39码
code_93:标准93码
code_128:标准128码
ean_8:缩短版国际商品条码
ean_13:标准版国际商品条码
itf:交叉码
upc_a:美国商品码a
upc_e:美国商品码e
upc_ean_extension:美国商品码扩展码
二维码:
qr_code:qr码
aztec:阿兹特克码
data_matrix:dm码
maxi_code:maxi码
pdf_417:pdf-417码
rss_14:rss-14码
rss_expanded:rss扩展码
type
- 类型public Barcode setScaleRate(String scaleRate)
scaleRate
- 缩放比例public Barcode setRadians(String radians)
radians
- 旋转弧度public Barcode setCodeMargin(String codeMargin)
codeMargin
- 条形码边距public Barcode setErrorLevel(String errorLevel)
errorLevel
- 纠错级别public Barcode setHeight(String height)
height
- 图像高度public Barcode setContent(String content)
content
- 内容public Barcode setOnColor(String onColor)
color:颜色(名称或16进制颜色)
transparent:透明
onColor
- 前景颜色public Barcode setOffColor(String offColor)
color:颜色(名称或16进制颜色)
transparent:透明
offColor
- 背景颜色public Barcode setWordsColor(String wordsColor)
color:颜色(名称或16进制颜色)
transparent:透明
wordsColor
- 文字颜色public Barcode setWordsFamily(String wordsFamily)
wordsFamily
- 文字名称public Barcode setWordsStyle(String wordsStyle)
normal:正常
bold:粗体
bold_italic:粗体斜体
italic:斜体
wordsStyle
- 文字样式public Barcode setWordsSize(String wordsSize)
wordsSize
- 文字大小public Barcode setWordsOffsetX(String wordsOffsetX)
wordsOffsetX
- 文字偏移量-X轴public Barcode setWordsOffsetY(String wordsOffsetY)
wordsOffsetY
- 文字偏移量-Y轴public Barcode setHorizontalStyle(String style)
left:居左
center:居中
right:居右
style
- 水平样式public Barcode setBreakBefore(String breakBefore)
auto:自动
column:分列
page:分页
even-page:在元素之前强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之前强制分页一次或两个,以便下一页将成为奇数页
breakBefore
- 分页符public Barcode setBreakAfter(String breakAfter)
auto:自动
column:分列
page:分页
even-page:在元素之后强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之后强制分页一次或两个,以便下一页将成为奇数页
breakAfter
- 分页符public Barcode enableKeepTogether()
public Barcode enableKeepWithPrevious()
public Barcode enableKeepWithNext()
public Barcode enableBorder()
public Element createElement(Document document)
createElement
in interface Component
document
- fo文档Copyright © 2024. All rights reserved.