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.
| 构造器和说明 |
|---|
Barcode() |
| 限定符和类型 | 方法和说明 |
|---|---|
Element |
createElement(Document document)
创建元素
|
Barcode |
enableBorder()
开启边框(调试时使用)
|
Barcode |
enableCache()
开启缓存
|
Barcode |
enableKeepTogether()
开启分页时保持
|
Barcode |
enableKeepWithNext()
开启分页时与下一个元素保持
|
Barcode |
enableKeepWithPrevious()
开启分页时与上一个元素保持
|
Barcode |
enableNoWhiteBorder()
开启无白边
|
Barcode |
setBreakAfter(String breakAfter)
设置分页符-后
auto:自动
column:分列
page:分页
even-page:在元素之后强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之后强制分页一次或两个,以便下一页将成为奇数页
|
Barcode |
setBreakBefore(String breakBefore)
设置分页符-前
auto:自动
column:分列
page:分页
even-page:在元素之前强制分页一次或两个,以便下一页将成为偶数页
odd-page:在元素之前强制分页一次或两个,以便下一页将成为奇数页
|
Barcode |
setCodeMargin(String codeMargin)
设置条形码边距
|
Barcode |
setContent(String content)
设置条形码内容
|
Barcode |
setErrorLevel(String errorLevel)
设置条形码纠错级别
|
Barcode |
setHeight(String height)
设置条形码图像高度
|
Barcode |
setHorizontalStyle(String style)
设置文本水平样式
left:居左
center:居中
right:居右
|
Barcode |
setId(String id)
设置id
|
Barcode |
setMargin(String margin)
设置上下左右边距
|
Barcode |
setMarginBottom(String marginBottom)
设置下边距
|
Barcode |
setMarginLeft(String marginLeft)
设置左边距
|
Barcode |
setMarginRight(String paddingRight)
设置右边距
|
Barcode |
setMarginTop(String marginTop)
设置上边距
|
Barcode |
setOffColor(String offColor)
设置条形码背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Barcode |
setOnColor(String onColor)
设置条形码前景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Barcode |
setPadding(String padding)
设置上下左右填充
|
Barcode |
setPaddingBottom(String paddingBottom)
设置下填充
|
Barcode |
setPaddingLeft(String paddingLeft)
设置左填充
|
Barcode |
setPaddingRight(String paddingRight)
设置右填充
|
Barcode |
setPaddingTop(String paddingTop)
设置上填充
|
Barcode |
setRadians(String radians)
设置条形码旋转弧度
|
Barcode |
setScaleRate(String scaleRate)
设置条形码缩放比例(实际比例)
|
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扩展码
|
Barcode |
setWidth(String width)
设置条形码图像宽度
|
Barcode |
setWords(String words)
设置条形码文字
|
Barcode |
setWordsColor(String wordsColor)
设置条形码文字颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Barcode |
setWordsFamily(String wordsFamily)
设置条形码文字名称
|
Barcode |
setWordsOffsetX(String wordsOffsetX)
设置条形码文字偏移量-X轴
|
Barcode |
setWordsOffsetY(String wordsOffsetY)
设置条形码文字偏移量-Y轴
|
Barcode |
setWordsSize(String wordsSize)
设置条形码文字大小
|
Barcode |
setWordsStyle(String wordsStyle)
设置条形码文字样式
normal:正常
bold:粗体
bold_italic:粗体斜体
italic:斜体
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendChild, createBlockElement, createBlockElement, createEmptyElement, transformpublic Barcode setMarginBottom(String marginBottom)
marginBottom - 下边距public Barcode setMarginLeft(String marginLeft)
marginLeft - 左边距public Barcode setMarginRight(String paddingRight)
paddingRight - 右边距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 setCodeMargin(String codeMargin)
codeMargin - 条形码边距public Barcode setErrorLevel(String errorLevel)
errorLevel - 纠错级别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 Barcode enableNoWhiteBorder()
public Barcode enableCache()
public Element createElement(Document document)
createElement 在接口中 Componentdocument - fo文档Copyright © 2025. All rights reserved.