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.
| 构造器和说明 |
|---|
Page() |
| 限定符和类型 | 方法和说明 |
|---|---|
Page |
addBodyComponent(Component... components)
添加页面主体组件
|
Page |
addBodyComponent(List<Component> components)
添加页面主体组件
|
Page |
addFooterComponent(Component... components)
添加页脚组件
|
Page |
addFooterComponent(List<Component> components)
添加页脚组件
|
Page |
addHeaderComponent(Component... components)
添加页眉组件
|
Page |
addHeaderComponent(List<Component> components)
添加页眉组件
|
Page |
changeLandscape()
切换横向
|
Element |
createElement(int index,
Document document,
Element bookmark)
创建元素
|
Page |
setBodyBackground(String background)
设置主体背景
|
Page |
setBodyBackgroundAttachment(String attachment)
设置主体背景附件
scroll:滚动
fixed:固定
|
Page |
setBodyBackgroundColor(String color)
设置主体背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setBodyBackgroundHorizontalPosition(String position)
设置主体背景图片水平定位
|
Page |
setBodyBackgroundImage(String image)
设置主体背景图片
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
|
Page |
setBodyBackgroundImageHeight(String height)
设置主体背景图片高度
|
Page |
setBodyBackgroundImageWidth(String width)
设置主体背景图片宽度
|
Page |
setBodyBackgroundPosition(String position)
设置主体背景图片定位
第一个参数为X轴
第二个参数为Y轴
|
Page |
setBodyBackgroundRepeat(String repeat)
设置主体背景图片重复
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
|
Page |
setBodyBackgroundVerticalPosition(String position)
设置主体背景图片垂直定位
|
Page |
setBodyMargin(String margin)
设置页面主体边距(上下左右边距)
|
Page |
setBodyMarginBottom(String margin)
设置页面主体下边距
|
Page |
setBodyMarginLeft(String margin)
设置页面主体左边距
|
Page |
setBodyMarginRight(String margin)
设置页面主体右边距
|
Page |
setBodyMarginTop(String margin)
设置页面主体上边距
|
Page |
setBodyWatermark(WatermarkComponent watermark)
设置主体水印
|
Page |
setEndBackground(String background)
设置右侧栏背景
|
Page |
setEndBackgroundAttachment(String attachment)
设置右侧栏背景附件
scroll:滚动
fixed:固定
|
Page |
setEndBackgroundColor(String color)
设置右侧栏背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setEndBackgroundHorizontalPosition(String position)
设置右侧栏背景图片水平定位
|
Page |
setEndBackgroundImage(String image)
设置右侧栏背景图片
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
|
Page |
setEndBackgroundImageHeight(String height)
设置右侧栏背景图片高度
|
Page |
setEndBackgroundImageWidth(String width)
设置右侧栏背景图片宽度
|
Page |
setEndBackgroundPosition(String position)
设置右侧栏背景图片定位
第一个参数为X轴
第二个参数为Y轴
|
Page |
setEndBackgroundRepeat(String repeat)
设置右侧栏背景图片重复
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
|
Page |
setEndBackgroundVerticalPosition(String position)
设置右侧栏背景图片垂直定位
|
Page |
setEndWatermark(WatermarkComponent watermark)
设置右侧栏水印
|
Page |
setEndWidth(String width)
设置右侧栏宽度
|
Page |
setFontColor(String color)
设置字体颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setFontFamily(String fontFamily)
设置字体名称
|
Page |
setFontSize(String fontSize)
设置字体大小
|
Page |
setFontSizeAdjust(String fontSizeAdjust)
设置字体大小调整
|
Page |
setFontStyle(String fontStyle)
设置字体样式
|
Page |
setFontWeight(String fontWeight)
设置字体重量
|
Page |
setFooterBackground(String background)
设置页脚背景
|
Page |
setFooterBackgroundAttachment(String attachment)
设置页脚背景附件
scroll:滚动
fixed:固定
|
Page |
setFooterBackgroundColor(String color)
设置页脚背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setFooterBackgroundHorizontalPosition(String position)
设置页脚背景图片水平定位
|
Page |
setFooterBackgroundImage(String image)
设置页脚背景图片
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
|
Page |
setFooterBackgroundPosition(String position)
设置页脚背景图片定位
第一个参数为X轴
第二个参数为Y轴
|
Page |
setFooterBackgroundRepeat(String repeat)
设置页脚背景图片重复
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
|
Page |
setFooterBackgroundVerticalPosition(String position)
设置页脚背景图片垂直定位
|
Page |
setFooterHeight(String height)
设置页脚高度
|
Page |
setFooterWatermark(WatermarkComponent watermark)
设置页脚水印
|
Page |
setForcePageCount(String forcePageCount)
强制页面计数
|
Page |
setHeaderBackground(String background)
设置页眉背景
|
Page |
setHeaderBackgroundAttachment(String attachment)
设置页眉背景附件
scroll:滚动
fixed:固定
|
Page |
setHeaderBackgroundColor(String color)
设置页眉背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setHeaderBackgroundHorizontalPosition(String position)
设置页眉背景图片水平定位
|
Page |
setHeaderBackgroundImage(String image)
设置页眉背景图片
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
|
Page |
setHeaderBackgroundPosition(String position)
设置页眉背景图片定位
第一个参数为X轴
第二个参数为Y轴
|
Page |
setHeaderBackgroundRepeat(String repeat)
设置页眉背景图片重复
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
|
Page |
setHeaderBackgroundVerticalPosition(String position)
设置页眉背景图片垂直定位
|
Page |
setHeaderHeight(String height)
设置页眉高度
|
Page |
setHeaderWatermark(WatermarkComponent watermark)
设置页眉水印
|
Page |
setHeight(String height)
设置页面高度
|
Page |
setId(String id)
设置id
|
Page |
setInitialPageNumber(String initialPageNumber)
初始化页码
|
Page |
setMargin(String margin)
设置页面边距(上下左右边距)
|
Page |
setMarginBottom(String margin)
设置页面下边距
|
Page |
setMarginLeft(String margin)
设置页面左边距
|
Page |
setMarginRight(String margin)
设置页面右边距
|
Page |
setMarginTop(String margin)
设置页面上边距
|
Page |
setStartBackground(String background)
设置左侧栏背景
|
Page |
setStartBackgroundAttachment(String attachment)
设置左侧栏背景附件
scroll:滚动
fixed:固定
|
Page |
setStartBackgroundColor(String color)
设置左侧栏背景颜色
color:颜色(名称或16进制颜色)
transparent:透明
|
Page |
setStartBackgroundHorizontalPosition(String position)
设置左侧栏背景图片水平定位
|
Page |
setStartBackgroundImage(String image)
设置左侧栏背景图片
注:路径须写为”url('xxx.png')“的形式
注:当为windows系统绝对路径时,须添加前缀“/”,例如:”url('/E:\test\test.png')“
|
Page |
setStartBackgroundImageHeight(String height)
设置左侧栏背景图片高度
|
Page |
setStartBackgroundImageWidth(String width)
设置左侧栏背景图片宽度
|
Page |
setStartBackgroundPosition(String position)
设置左侧栏背景图片定位
第一个参数为X轴
第二个参数为Y轴
|
Page |
setStartBackgroundRepeat(String repeat)
设置左侧栏背景图片重复
repeat:水平垂直重复
repeat-x:水平重复
repeat-y:垂直重复
no-repeat:不重复
|
Page |
setStartBackgroundVerticalPosition(String position)
设置左侧栏背景图片垂直定位
|
Page |
setStartWatermark(WatermarkComponent watermark)
设置左侧栏水印
|
Page |
setStartWidth(String width)
设置左侧栏宽度
|
Page |
setWidth(String width)
设置页面宽度
|
public Page setBodyMarginBottom(String margin)
margin - 边距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 在接口中 PageComponentindex - 当前索引document - fo文档bookmark - 书签元素public Page setInitialPageNumber(String initialPageNumber)
initialPageNumber - 初始页码Copyright © 2024. All rights reserved.