public class Page extends Object implements PageComponent
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-fop 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 |
---|
Page() |
public Page setMarginBottom(String margin)
margin
- 边距public Page setMarginLeft(String margin)
margin
- 边距public Page setMarginRight(String margin)
margin
- 边距public Page setBodyMargin(String margin)
margin
- 边距public Page setBodyMarginTop(String margin)
margin
- 边距public Page setBodyMarginBottom(String margin)
margin
- 边距public Page setBodyMarginLeft(String margin)
margin
- 边距public Page setBodyMarginRight(String margin)
margin
- 边距public Page setHeaderHeight(String height)
height
- 高度public Page setFooterHeight(String height)
height
- 高度public Page setFontFamily(String fontFamily)
fontFamily
- 字体名称public Page setFontStyle(String fontStyle)
fontStyle
- 字体样式public Page setFontSize(String fontSize)
fontSize
- 字体大小public Page setFontWeight(String fontWeight)
fontWeight
- 字体重量public Page setFontSizeAdjust(String fontSizeAdjust)
fontSizeAdjust
- 字体大小调整public Page setFontColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 字体颜色public Page setBodyBackground(String background)
background
- 背景public Page setBodyBackgroundImage(String image)
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
image
- 图片public Page setBodyBackgroundImageWidth(String width)
width
- 图片宽度public Page setBodyBackgroundImageHeight(String height)
height
- 图片高度public Page setBodyBackgroundAttachment(String attachment)
scroll:滚动
fixed:固定
attachment
- 附件public Page setBodyBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 颜色public Page setBodyBackgroundPosition(String position)
第一个参数为X轴
第二个参数为Y轴
position
- 定位public Page setBodyBackgroundHorizontalPosition(String position)
position
- 定位public Page setBodyBackgroundVerticalPosition(String position)
position
- 定位public Page setBodyBackgroundRepeat(String repeat)
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
repeat
- 重复public Page setBodyWatermark(WatermarkComponent watermark)
watermark
- 水印组件public Page setStartBackground(String background)
background
- 背景public Page setStartBackgroundImage(String image)
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
image
- 图片public Page setStartBackgroundImageWidth(String width)
width
- 图片宽度public Page setStartBackgroundImageHeight(String height)
height
- 图片高度public Page setStartBackgroundAttachment(String attachment)
scroll:滚动
fixed:固定
attachment
- 附件public Page setStartBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 颜色public Page setStartBackgroundPosition(String position)
第一个参数为X轴
第二个参数为Y轴
position
- 定位public Page setStartBackgroundHorizontalPosition(String position)
position
- 定位public Page setStartBackgroundVerticalPosition(String position)
position
- 定位public Page setStartBackgroundRepeat(String repeat)
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
repeat
- 重复public Page setStartWatermark(WatermarkComponent watermark)
watermark
- 水印组件public Page setEndBackground(String background)
background
- 背景public Page setEndBackgroundImage(String image)
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
image
- 图片public Page setEndBackgroundImageWidth(String width)
width
- 图片宽度public Page setEndBackgroundImageHeight(String height)
height
- 图片高度public Page setEndBackgroundAttachment(String attachment)
scroll:滚动
fixed:固定
attachment
- 附件public Page setEndBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 颜色public Page setEndBackgroundPosition(String position)
第一个参数为X轴
第二个参数为Y轴
position
- 定位public Page setEndBackgroundHorizontalPosition(String position)
position
- 定位public Page setEndBackgroundVerticalPosition(String position)
position
- 定位public Page setEndBackgroundRepeat(String repeat)
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
repeat
- 重复public Page setEndWatermark(WatermarkComponent watermark)
watermark
- 水印组件public Page setHeaderBackground(String background)
background
- 背景public Page setHeaderBackgroundImage(String image)
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
image
- 图片public Page setHeaderBackgroundAttachment(String attachment)
scroll:滚动
fixed:固定
attachment
- 附件public Page setHeaderBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 颜色public Page setHeaderBackgroundPosition(String position)
第一个参数为X轴
第二个参数为Y轴
position
- 定位public Page setHeaderBackgroundHorizontalPosition(String position)
position
- 定位public Page setHeaderBackgroundVerticalPosition(String position)
position
- 定位public Page setHeaderBackgroundRepeat(String repeat)
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
repeat
- 重复public Page setHeaderWatermark(WatermarkComponent watermark)
watermark
- 水印组件public Page setFooterBackground(String background)
background
- 背景public Page setFooterBackgroundImage(String image)
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
image
- 图片public Page setFooterBackgroundAttachment(String attachment)
scroll:滚动
fixed:固定
attachment
- 附件public Page setFooterBackgroundColor(String color)
color:颜色(名称或16进制颜色)
transparent:透明
color
- 颜色public Page setFooterBackgroundPosition(String position)
第一个参数为X轴
第二个参数为Y轴
position
- 定位public Page setFooterBackgroundHorizontalPosition(String position)
position
- 定位public Page setFooterBackgroundVerticalPosition(String position)
position
- 定位public Page setFooterBackgroundRepeat(String repeat)
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
repeat
- 重复public Page setFooterWatermark(WatermarkComponent watermark)
watermark
- 水印组件public Page changeLandscape()
public Page addBodyComponent(Component... components)
components
- 组件列表public Page addBodyComponent(List<Component> components)
components
- 组件列表public Page addHeaderComponent(Component... components)
components
- 组件列表public Page addHeaderComponent(List<Component> components)
components
- 组件列表public Page addFooterComponent(Component... components)
components
- 组件列表public Page addFooterComponent(List<Component> components)
components
- 组件列表public Element createElement(int index, Document document, Element bookmark)
createElement
in interface PageComponent
index
- 当前索引document
- fo文档bookmark
- 书签元素public Page setInitialPageNumber(String initialPageNumber)
initialPageNumber
- 初始页码Copyright © 2024. All rights reserved.