XpsDocument

Inheritance: java.lang.Object, com.aspose.page.Document

All Implemented Interfaces: java.io.Closeable

public final class XpsDocument extends Document implements Closeable

封装 XPS 文档主要实体的类,提供对任何 XPS 元素的操作方法。

构造函数

构造函数描述
XpsDocument()创建具有默认页面大小的空 XPS 文档。
XpsDocument(String path)打开位于路径的现有 XPS 文档。
XpsDocument(InputStream stream, LoadOptions options)加载存储在流中的现有文档作为 XPS 文档。

方法

方法描述
add(T element)添加一个内容元素(Canvas、Path 或 Glyphs)
insert(int index, T element)在索引位置向活动页面插入元素(Canvas、Path 或 Glyphs)。
remove(T element)从活动页面移除元素。
addCanvas()向活动页面添加新的 canvas。
addDocument()添加一个具有默认页面大小的空文档,并将添加的文档设为活动文档。
addDocument(boolean activate)添加一个具有默认页面大小的空文档。
addDocument(float width, float height)添加一个首页尺寸为 width 和 height 的空文档,并将添加的文档设为活动文档。
addDocument(float width, float height, boolean activate)添加一个空文档,其第一页的宽度为 width,高度为 height。
addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)向活动页面添加新字形。
addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)向活动页面添加新字形。
addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target)向文档添加一个大纲条目。
addPage()向文档添加一个使用默认页面尺寸的空页。
addPage(boolean activate)向文档添加一个使用默认页面尺寸的空页。
addPage(XpsPage page)向文档添加页面并将添加的页面设为活动页面。
addPage(XpsPage page, boolean activate)向文档添加页面。
addPage(float width, float height)向文档添加一个指定宽度为 width、高度为 height 的空页。
addPage(float width, float height, boolean activate)向文档添加一个指定宽度为 width、高度为 height 的空页。
addPath(XpsPathGeometry data)向活动页面添加新路径。
close()释放该实例。
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)创建一个新的带描边的椭圆弧段。
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)创建一个新的椭圆弧段。
createCanvas()创建一个新的 canvas。
createColor(XpsIccProfile iccProfile, float[] components)在基于 ICC 的颜色空间中创建一个新颜色。
createColor(float r, float g, float b)在 scRGB 颜色空间中创建一个新颜色。
createColor(float a, float r, float g, float b)在 scRGB 颜色空间中创建一个新颜色。
createColor(int r, int g, int b)在 sRGB 颜色空间中创建一个新颜色。
createColor(int a, int r, int g, int b)在 sRGB 颜色空间中创建一个新颜色。
createColor(Color color)创建一个新颜色。
createColor(String path, float[] components)在基于 ICC 的颜色空间中创建一个新颜色。
createFont(InputStream stream)从流创建新的 TrueType 字体资源。
createFont(String fontFamily, XpsFontStyle fontStyle)创建新的 TrueType 字体资源。
createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)创建新的 glyphs。
createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)创建新的 glyphs。
createGradientStop(XpsColor color, float offset)创建一个新的渐变停止点。
createGradientStop(Color color, float offset)创建一个新的渐变停止点。
createIccProfile(InputStream stream)从流创建新的 ICC 配置文件资源。
createIccProfile(String iccProfilePath)从位于 iccProfilePath 的 ICC 配置文件创建新的 ICC 配置文件资源。
createImage(InputStream stream)从流创建新的图像资源。
createImage(String imagePath)从位于 imagePath 的图像文件创建新的图像资源。
createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)创建一个新的图像画刷。
createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)创建一个新的图像画刷。
createLinearGradientBrush(Point2D startPoint, Point2D endPoint)创建一个新的线性渐变画刷。
createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)创建一个新的线性渐变画刷。
createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)创建一个新的仿射变换矩阵。
createPath(XpsPathGeometry data)创建一个新的 path。
createPathFigure(Point2D startPoint)创建一个新的开放路径图形。
createPathFigure(Point2D startPoint, boolean isClosed)创建一个新的路径图形。
createPathFigure(Point2D startPoint, List segments)创建一个新的开放路径图形。
createPathFigure(Point2D startPoint, List segments, boolean isClosed)创建一个新的路径图形。
createPathGeometry()创建一个新的路径几何体。
createPathGeometry(String abbreviatedGeometry)创建一个使用缩写形式指定的新路径几何体。
createPathGeometry(List pathFigures)创建一个使用指定路径图形列表的新路径几何体。
createPolyBezierSegment(Point2D[] points)创建一组新的带描边的三次 B?zier 曲线。
createPolyBezierSegment(Point2D[] points, boolean isStroked)创建一组新的三次 B?zier 曲线。
createPolyLineSegment(Point2D[] points)创建一个包含任意数量单个顶点的带描边多边形绘图。
createPolyLineSegment(Point2D[] points, boolean isStroked)创建一个包含任意数量单个顶点的多边形绘图。
createPolyQuadraticBezierSegment(Point2D[] points)创建一组新的带描边的二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,使用指定的控制点。
createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)创建一组新的二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,使用指定的控制点。
createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)创建一个新的径向渐变画刷。
createRadialGradientBrush(List gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)创建一个新的径向渐变画刷。
createSolidColorBrush(XpsColor color)创建一个新的纯色画刷。
createSolidColorBrush(Color color)创建一个新的纯色画刷。
createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)创建一个新的视觉画刷。
equals(Object arg0)
getActiveDocument()返回活动文档的编号。
getActivePage()返回活动文档中活动页面的编号。
getClass()
getDocumentCount()返回 XPS 包中文档的数量。
getDocumentPrintTicket(int documentIndex)获取索引为 documentIndex 的文档的打印票据。
getJobPrintTicket()返回文档的作业打印票据。
getPage()返回活动页面的 XpsPage 实例。
getPageCount()返回活动文档中的页数。
getPagePrintTicket(int documentIndex, int pageIndex)获取索引为 documentIndex 的文档中索引为 pageIndex 的页面的打印票据。
getTotalPageCount()返回 XPS 文档中所有文档的总页数。
getUtils()获取提供超出正式 XPS 操作 API 的实用功能的对象。
hashCode()
insertCanvas(int index)在索引位置 index 将新画布插入到活动页面。
insertDocument(int index)在索引位置 index 插入一个使用默认页面尺寸的空文档,并将插入的文档设为活动文档。
insertDocument(int index, boolean activate)在索引位置 index 插入一个使用默认页面尺寸的空文档。
insertDocument(int index, float width, float height)在索引位置 index 插入一个第一页尺寸为 width 和 height 的空文档,并将插入的文档设为活动文档。
insertDocument(int index, float width, float height, boolean activate)在 index position 插入一个空文档,第一页的尺寸为 width 和 height。
insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)在 index position 向活动页插入新的字形。
insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)在 index position 向活动页插入新的字形。
insertPage(int index)在 index position 插入一个空页到文档,使用默认页面大小,并将插入的页面设为活动页。
insertPage(int index, boolean activate)在 index position 插入一个空页到文档,使用默认页面大小。
insertPage(int index, XpsPage page)在 index position 向文档插入一个页面,并将插入的页面设为活动页。
insertPage(int index, XpsPage page, boolean activate)在 index position 向文档插入一个页面。
insertPage(int index, float width, float height)在 index position 插入一个空页到文档,使用指定的 width 和 height,并将插入的页面设为活动页。
insertPage(int index, float width, float height, boolean activate)在 index position 插入一个空页到文档,使用指定的 width 和 height。
insertPath(int index, XpsPathGeometry data)在 index position 向活动页插入一个新路径。
isLicensed()指示是否已访问并且有效的 Aspose.Page for Java 产品许可证。
merge(String[] filesForMerge, OutputStream outStream)将多个 XPS 文件合并为一个 XPS 文档。
merge(String[] filesForMerge, String outXpsFilePath)将多个 XPS 文件合并为一个 XPS 文档。
mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options)使用 Device 实例将 XPS 文档合并为 PDF。
mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options)使用 Device 实例将 XPS 文档合并为 PDF。
notify()
notifyAll()
removeAt(int index)在 index position 从活动页移除一个元素。
removeDocumentAt(int index)在 index position 移除一个文档。
removePage(XpsPage page)从文档中移除一个页面。
removePageAt(int index)在 index position 从文档中移除一个页面。
save(Device device, SaveOptions options)使用 Device 实例保存文档。
save(OutputStream stream)将 XPS 文档保存到流。
save(String path)将 XPS 文档保存到位于 path 的 XPS 文件。
saveAsImage(ImageSaveOptions options)将文档保存为图像文件。输出目录和文件名将与输入的 XPS 文件相同。
saveAsImage(ImageSaveOptions options, String outDir, String fileNameTemplate)将文档保存为图像文件到指定目录,并使用指定的文件名。
saveAsImageBytes(ImageSaveOptions options)以位图图像格式将文档保存为字节数组。
saveAsPdf(OutputStream stream, PdfSaveOptions options)以 PDF 格式保存文档。
saveAsPdf(String outPdfFilePath, PdfSaveOptions options)以 PDF 格式保存文档。
saveAsPs(OutputStream stream, PsSaveOptions options)以 PS 格式保存文档。
saveAsPs(String outPsFilePath, PsSaveOptions options)以 PostSscript 格式保存文档。
selectActiveDocument(int documentNumber)选择一个活动文档进行编辑。
selectActivePage(int pageNumber)选择用于编辑的活动文档页。
setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket)将 printTicket 链接到由 documentIndex 索引的文档。
setJobPrintTicket(JobPrintTicket value)设置文档的作业打印票据。
setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket)将 printTicket 链接到在由 documentIndex 索引的文档中由 pageIndex 索引的页面。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

XpsDocument()

public XpsDocument()

创建具有默认页面大小的空 XPS 文档。

XpsDocument(String path)

public XpsDocument(String path)

打开位于路径的现有 XPS 文档。

Parameters:

参数类型描述
pathjava.lang.String文档的位置。

XpsDocument(InputStream stream, LoadOptions options)

public XpsDocument(InputStream stream, LoadOptions options)

加载存储在流中的现有文档作为 XPS 文档。

Parameters:

参数类型描述
java.io.InputStream文档流。
optionsLoadOptions文档加载选项。

add(T element)

public T <T>add(T element)

添加一个内容元素(Canvas、Path 或 Glyphs)

Parameters:

参数类型描述
元素T要添加的元素。

Returns: T - 已添加的元素。

insert(int index, T element)

public T <T>insert(int index, T element)

在索引位置向活动页面插入元素(Canvas、Path 或 Glyphs)。

Parameters:

参数类型描述
索引int应插入元素的位置。
元素T要插入的元素。

Returns: T - 已插入的元素。

remove(T element)

public T <T>remove(T element)

从活动页面移除元素。

Parameters:

参数类型描述
元素T要删除的元素。

Returns: T - 已删除的元素。

addCanvas()

public XpsCanvas addCanvas()

向活动页面添加新的 canvas。

Returns: XpsCanvas - Added canvas.

addDocument()

public void addDocument()

添加一个具有默认页面大小的空文档,并将添加的文档设为活动文档。

addDocument(boolean activate)

public void addDocument(boolean activate)

添加一个具有默认页面大小的空文档。

Parameters:

参数类型描述
激活boolean指示是否将添加的文档设为活动的标志。

addDocument(float width, float height)

public void addDocument(float width, float height)

添加一个首页尺寸为 width 和 height 的空文档,并将添加的文档设为活动文档。

Parameters:

参数类型描述
宽度float第一页的宽度。
高度float第一页的高度。

addDocument(float width, float height, boolean activate)

public void addDocument(float width, float height, boolean activate)

添加一个空文档,其第一页的宽度为 width,高度为 height。

Parameters:

参数类型描述
宽度float第一页的宽度。
高度float第一页的高度。
激活boolean指示是否将添加的文档设为活动的标志。

addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

public XpsGlyphs addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

向活动页面添加新字形。

Parameters:

参数类型描述
fontXpsFont字体资源。
fontRenderingEmSizefloat字体大小。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - Added glyphs.

addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

向活动页面添加新字形。

Parameters:

参数类型描述
fontFamilyjava.lang.String字体族。
fontRenderingEmSizefloat字体大小。
fontStyleXpsFontStyle字体样式。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - Added glyphs.

addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target)

public void addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target)

向文档添加一个大纲条目。

Parameters:

参数类型描述
描述java.lang.String条目描述。
outlineLevelint大纲级别。
targetXpsHyperlinkTarget入口目标。

addPage()

public XpsPage addPage()

向文档添加一个使用默认页面尺寸的空页。

Returns: XpsPage - Added page.

addPage(boolean activate)

public XpsPage addPage(boolean activate)

向文档添加一个使用默认页面尺寸的空页。

Parameters:

参数类型描述
激活boolean指示是否将添加的页面设为活动的标志。

Returns: XpsPage - Added page.

addPage(XpsPage page)

public XpsPage addPage(XpsPage page)

向文档添加页面并将添加的页面设为活动页面。

Parameters:

参数类型描述
pageXpsPage要添加的页面。

Returns: XpsPage - Added page.

addPage(XpsPage page, boolean activate)

public XpsPage addPage(XpsPage page, boolean activate)

向文档添加页面。

Parameters:

参数类型描述
pageXpsPage要添加的页面。
激活boolean指示是否将添加的页面设为活动的标志。

Returns: XpsPage - Added page.

addPage(float width, float height)

public XpsPage addPage(float width, float height)

向文档添加一个指定宽度为 width、高度为 height 的空页。

Parameters:

参数类型描述
宽度float新页面的宽度。
高度float新页面的高度。

Returns: XpsPage - Added page.

addPage(float width, float height, boolean activate)

public XpsPage addPage(float width, float height, boolean activate)

向文档添加一个指定宽度为 width、高度为 height 的空页。

Parameters:

参数类型描述
宽度float新页面的宽度。
高度float新页面的高度。
激活boolean指示是否将添加的页面设为活动的标志。

Returns: XpsPage - Added page.

addPath(XpsPathGeometry data)

public XpsPath addPath(XpsPathGeometry data)

向活动页面添加新路径。

Parameters:

参数类型描述
dataXpsPathGeometry路径的几何形状。

Returns: XpsPath - Added path.

close()

public void close()

释放该实例。

createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)

public XpsArcSegment createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)

创建一个新的带描边的椭圆弧段。

Parameters:

参数类型描述
java.awt.geom.Point2D椭圆弧的终点。
大小java.awt.geom.Dimension2D椭圆弧的 x 和 y 半径,以 x,y 对的形式表示。
rotationAnglefloat指示椭圆相对于当前坐标系的旋转方式。
isLargeArcboolean确定弧线是否以 180 度或更大的扫掠绘制。
sweepDirectionXpsSweepDirection弧线绘制的方向。

Returns: XpsArcSegment - New elliptical arc segment.

createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)

public XpsArcSegment createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked)

创建一个新的椭圆弧段。

Parameters:

参数类型描述
java.awt.geom.Point2D椭圆弧的终点。
大小java.awt.geom.Dimension2D椭圆弧的 x 和 y 半径,以 x,y 对的形式表示。
rotationAnglefloat指示椭圆相对于当前坐标系的旋转方式。
isLargeArcboolean确定弧线是否以 180 度或更大的扫掠绘制。
sweepDirectionXpsSweepDirection弧线绘制的方向。
isStrokedboolean指定是否绘制路径此段的描边。

Returns: XpsArcSegment - New elliptical arc segment.

createCanvas()

public XpsCanvas createCanvas()

创建一个新的 canvas。

Returns: XpsCanvas - New canvas.

createColor(XpsIccProfile iccProfile, float[] components)

public XpsColor createColor(XpsIccProfile iccProfile, float[] components)

在基于 ICC 的颜色空间中创建一个新颜色。

Parameters:

参数类型描述
iccProfileXpsIccProfileICC 配置文件资源。
componentsfloat[]颜色分量。

Returns: XpsColor - New color.

createColor(float r, float g, float b)

public XpsColor createColor(float r, float g, float b)

在 scRGB 颜色空间中创建一个新颜色。

Parameters:

参数类型描述
rfloat红色分量。
gfloat绿色分量。
bfloat蓝色分量。

Returns: XpsColor - New color.

createColor(float a, float r, float g, float b)

public XpsColor createColor(float a, float r, float g, float b)

在 scRGB 颜色空间中创建一个新颜色。

Parameters:

参数类型描述
afloatAlpha 颜色分量。
rfloat红色分量。
gfloat绿色分量。
bfloat蓝色分量。

Returns: XpsColor - New color.

createColor(int r, int g, int b)

public XpsColor createColor(int r, int g, int b)

在 sRGB 颜色空间中创建一个新颜色。

Parameters:

参数类型描述
rint红色分量。
gint绿色分量。
bint蓝色分量。

Returns: XpsColor - New color.

createColor(int a, int r, int g, int b)

public XpsColor createColor(int a, int r, int g, int b)

在 sRGB 颜色空间中创建一个新颜色。

Parameters:

参数类型描述
aintAlpha 颜色分量。
rint红色分量。
gint绿色分量。
bint蓝色分量。

Returns: XpsColor - New color.

createColor(Color color)

public XpsColor createColor(Color color)

创建一个新颜色。

Parameters:

参数类型描述
colorjava.awt.ColorRGB 颜色的本机颜色实例。

Returns: XpsColor - New color.

createColor(String path, float[] components)

public XpsColor createColor(String path, float[] components)

在基于 ICC 的颜色空间中创建一个新颜色。

Parameters:

参数类型描述
pathjava.lang.StringICC 配置文件的路径。
componentsfloat[]颜色分量。

Returns: XpsColor - New color.

createFont(InputStream stream)

public XpsFont createFont(InputStream stream)

从流创建新的 TrueType 字体资源。

Parameters:

参数类型描述
java.io.InputStream包含要作为资源使用的 ICC 配置文件的流。

Returns: XpsFont - New TrueType font resource.

createFont(String fontFamily, XpsFontStyle fontStyle)

public XpsFont createFont(String fontFamily, XpsFontStyle fontStyle)

创建新的 TrueType 字体资源。

Parameters:

参数类型描述
fontFamilyjava.lang.String字体族。
fontStyleXpsFontStyle字体样式。请参阅 XpsFont 类常量(它们是位标志),了解可组合的值。

Returns: XpsFont - New TrueType font resource.

createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

public XpsGlyphs createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)

创建新的 glyphs。

Parameters:

参数类型描述
fontXpsFont字体资源。
fontRenderingEmSizefloat字体大小。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - New glyphs.

createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

创建新的 glyphs。

Parameters:

参数类型描述
fontFamilyjava.lang.String字体族。
fontRenderingEmSizefloat字体大小。
fontStyleXpsFontStyle字体样式。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - New glyphs.

createGradientStop(XpsColor color, float offset)

public XpsGradientStop createGradientStop(XpsColor color, float offset)

创建一个新的渐变停止点。

Parameters:

参数类型描述
colorXpsColor渐变停止颜色。
偏移float渐变偏移。

Returns: XpsGradientStop - New gradient stop.

createGradientStop(Color color, float offset)

public XpsGradientStop createGradientStop(Color color, float offset)

创建一个新的渐变停止点。

Parameters:

参数类型描述
colorjava.awt.Color渐变停止颜色。
偏移float渐变偏移。

Returns: XpsGradientStop - New gradient stop.

createIccProfile(InputStream stream)

public XpsIccProfile createIccProfile(InputStream stream)

从流创建新的 ICC 配置文件资源。

Parameters:

参数类型描述
java.io.InputStream包含要作为资源使用的 ICC 配置文件的流。

Returns: XpsIccProfile - New ICC profile resource.

createIccProfile(String iccProfilePath)

public XpsIccProfile createIccProfile(String iccProfilePath)

从位于 iccProfilePath 的 ICC 配置文件创建新的 ICC 配置文件资源。

Parameters:

参数类型描述
iccProfilePathjava.lang.StringICC 配置文件的路径,用作资源。

Returns: XpsIccProfile - New ICC profile resource.

createImage(InputStream stream)

public XpsImage createImage(InputStream stream)

从流创建新的图像资源。

Parameters:

参数类型描述
java.io.InputStream包含要作为资源使用的图像的流。

Returns: XpsImage - New image resource.

createImage(String imagePath)

public XpsImage createImage(String imagePath)

从位于 imagePath 的图像文件创建新的图像资源。

Parameters:

参数类型描述
imagePathjava.lang.String图像的路径,用作资源。

Returns: XpsImage - New image resource.

createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)

public XpsImageBrush createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)

创建一个新的图像画刷。

Parameters:

参数类型描述
imageXpsImage图像资源。
视图框java.awt.geom.Rectangle2D画笔源内容的位置和尺寸。
视口java.awt.geom.Rectangle2D在包含坐标空间中,主要画笔瓦片的区域(可能会重复)用于填充画笔所应用的区域。

Returns: XpsImageBrush - New image brush.

createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)

public XpsImageBrush createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)

创建一个新的图像画刷。

Parameters:

参数类型描述
imagePathjava.lang.String用作画笔瓦片的图像路径。
视图框java.awt.geom.Rectangle2D画笔源内容的位置和尺寸。
视口java.awt.geom.Rectangle2D在包含坐标空间中,主要画笔瓦片的区域(可能会重复)用于填充画笔所应用的区域。

Returns: XpsImageBrush - New image brush.

createLinearGradientBrush(Point2D startPoint, Point2D endPoint)

public XpsLinearGradientBrush createLinearGradientBrush(Point2D startPoint, Point2D endPoint)

创建一个新的线性渐变画刷。

Parameters:

参数类型描述
startPointjava.awt.geom.Point2D线性渐变的起始点。
endPointjava.awt.geom.Point2D线性渐变的结束点。

Returns: XpsLinearGradientBrush - New linear gradient brush.

createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)

public XpsLinearGradientBrush createLinearGradientBrush(List<XpsGradientStop> gradientStops, Point2D startPoint, Point2D endPoint)

创建一个新的线性渐变画刷。

Parameters:

参数类型描述
gradientStopsjava.util.List<com.aspose.xps.XpsGradientStop>渐变停靠点的列表。
startPointjava.awt.geom.Point2D线性渐变的起始点。
endPointjava.awt.geom.Point2D线性渐变的结束点。

Returns: XpsLinearGradientBrush - New linear gradient brush.

createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)

public XpsMatrix createMatrix(float m11, float m12, float m21, float m22, float m31, float m32)

创建一个新的仿射变换矩阵。

Parameters:

参数类型描述
m11float元素 11。
m12float元素 12。
m21float元素 21。
m22float元素 22。
m31float元素 31。
m32float元素 32。

Returns: XpsMatrix - New affine transformation matrix.

createPath(XpsPathGeometry data)

public XpsPath createPath(XpsPathGeometry data)

创建一个新的 path。

Parameters:

参数类型描述
dataXpsPathGeometry路径的几何形状。

Returns: XpsPath - New path.

createPathFigure(Point2D startPoint)

public XpsPathFigure createPathFigure(Point2D startPoint)

创建一个新的开放路径图形。

Parameters:

参数类型描述
startPointjava.awt.geom.Point2D路径图形的第一个段的起始点。

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, boolean isClosed)

public XpsPathFigure createPathFigure(Point2D startPoint, boolean isClosed)

创建一个新的路径图形。

Parameters:

参数类型描述
startPointjava.awt.geom.Point2D路径图形的第一个段的起始点。
isClosedboolean指定路径是否闭合。如果设置为 true,则描边以 “closed” 方式绘制,即路径图形最后一个段的最后一点会与 StartPoint 属性指定的点相连;否则描边以 “open” 方式绘制,最后一点不会连接到起始点。仅在路径图形用于指定描边的 Path 元素时适用。

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, List segments)

public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments)

创建一个新的开放路径图形。

Parameters:

参数类型描述
startPointjava.awt.geom.Point2D路径图形的第一个段的起始点。
segmentsjava.util.List<com.aspose.xps.XpsPathSegment>路径段的列表。

Returns: XpsPathFigure - New path figure.

createPathFigure(Point2D startPoint, List segments, boolean isClosed)

public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments, boolean isClosed)

创建一个新的路径图形。

Parameters:

参数类型描述
startPointjava.awt.geom.Point2D路径图形的第一个段的起始点。
segmentsjava.util.List<com.aspose.xps.XpsPathSegment>路径段的列表。
isClosedboolean指定路径是否闭合。如果设置为 true,则描边以 “closed” 方式绘制,即路径图形最后一个段的最后一点会与 StartPoint 属性指定的点相连;否则描边以 “open” 方式绘制,最后一点不会连接到起始点。仅在路径图形用于指定描边的 Path 元素时适用。

Returns: XpsPathFigure - New path figure.

createPathGeometry()

public XpsPathGeometry createPathGeometry()

创建一个新的路径几何体。

Returns: XpsPathGeometry - New path geometry.

createPathGeometry(String abbreviatedGeometry)

public XpsPathGeometry createPathGeometry(String abbreviatedGeometry)

创建一个使用缩写形式指定的新路径几何体。

Parameters:

参数类型描述
abbreviatedGeometryjava.lang.String路径几何的简写形式。

Returns: XpsPathGeometry - New path geometry.

createPathGeometry(List pathFigures)

public XpsPathGeometry createPathGeometry(List<XpsPathFigure> pathFigures)

创建一个使用指定路径图形列表的新路径几何体。

Parameters:

参数类型描述
pathFiguresjava.util.List<com.aspose.xps.XpsPathFigure>路径图形的列表。

Returns: XpsPathGeometry - New path geometry.

createPolyBezierSegment(Point2D[] points)

public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points)

创建一组新的带描边的三次 B?zier 曲线。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]多个 B?bezier 段的控制点。

Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.

createPolyBezierSegment(Point2D[] points, boolean isStroked)

public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points, boolean isStroked)

创建一组新的三次 B?zier 曲线。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]多个 B?bezier 段的控制点。
isStrokedboolean指定是否绘制路径此段的描边。

Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.

createPolyLineSegment(Point2D[] points)

public XpsPolyLineSegment createPolyLineSegment(Point2D[] points)

创建一个包含任意数量单个顶点的带描边多边形绘图。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]定义折线段的多个段的坐标集合。

Returns: XpsPolyLineSegment - New polygonal drawing segment.

createPolyLineSegment(Point2D[] points, boolean isStroked)

public XpsPolyLineSegment createPolyLineSegment(Point2D[] points, boolean isStroked)

创建一个包含任意数量单个顶点的多边形绘图。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]定义折线段的多个段的坐标集合。
isStrokedboolean指定是否绘制路径此段的描边。

Returns: XpsPolyLineSegment - New polygonal drawing segment.

createPolyQuadraticBezierSegment(Point2D[] points)

public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points)

创建一组新的带描边的二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,使用指定的控制点。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]多个二次 B?bezier 段的控制点。

Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.

createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)

public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)

创建一组新的二次 B?zier 曲线,从路径图形中的前一点通过一组顶点,使用指定的控制点。

Parameters:

参数类型描述
pointsjava.awt.geom.Point2D[]多个二次 B?bezier 段的控制点。
isStrokedboolean指定是否绘制路径此段的描边。

Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.

createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

public XpsRadialGradientBrush createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

创建一个新的径向渐变画刷。

Parameters:

参数类型描述
centerjava.awt.geom.Point2D径向渐变的中心点(即椭圆的中心)。
gradientOriginjava.awt.geom.Point2D径向渐变的原点。
radiusXfloat定义径向渐变的椭圆在 x 维度上的半径。
radiusYfloat定义径向渐变的椭圆在 y 维度上的半径。

Returns: XpsRadialGradientBrush - New radial gradient brush.

createRadialGradientBrush(List gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

public XpsRadialGradientBrush createRadialGradientBrush(List<XpsGradientStop> gradientStops, Point2D center, Point2D gradientOrigin, float radiusX, float radiusY)

创建一个新的径向渐变画刷。

Parameters:

参数类型描述
gradientStopsjava.util.List<com.aspose.xps.XpsGradientStop>渐变停靠点的列表。
centerjava.awt.geom.Point2D径向渐变的中心点(即椭圆的中心)。
gradientOriginjava.awt.geom.Point2D径向渐变的原点。
radiusXfloat定义径向渐变的椭圆在 x 维度上的半径。
radiusYfloat定义径向渐变的椭圆在 y 维度上的半径。

Returns: XpsRadialGradientBrush - New radial gradient brush.

createSolidColorBrush(XpsColor color)

public XpsSolidColorBrush createSolidColorBrush(XpsColor color)

创建一个新的纯色画刷。

Parameters:

参数类型描述
colorXpsColor填充元素的颜色。

Returns: XpsSolidColorBrush - New solid color brush.

createSolidColorBrush(Color color)

public XpsSolidColorBrush createSolidColorBrush(Color color)

创建一个新的纯色画刷。

Parameters:

参数类型描述
colorjava.awt.Color填充元素的颜色。

Returns: XpsSolidColorBrush - New solid color brush.

createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)

public XpsVisualBrush createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)

创建一个新的视觉画刷。

Parameters:

参数类型描述
elementXpsContentElement用于视觉属性的视觉画刷的 XPS 元素(Canvas、Path 或 Glyphs)。
视图框java.awt.geom.Rectangle2D画笔源内容的位置和尺寸。
视口java.awt.geom.Rectangle2D在包含坐标空间中,主要画笔瓦片的区域(可能会重复)用于填充画笔所应用的区域。

Returns: XpsVisualBrush - New visual brush.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

参数类型描述
arg0java.lang.Object

Returns: boolean

getActiveDocument()

public int getActiveDocument()

返回活动文档的编号。

Returns: int - 整数值。

getActivePage()

public int getActivePage()

返回活动文档中活动页面的编号。

Returns: int - 整数值。

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDocumentCount()

public int getDocumentCount()

返回 XPS 包中文档的数量。

Returns: int - XPS 包中文档的数量。

getDocumentPrintTicket(int documentIndex)

public DocumentPrintTicket getDocumentPrintTicket(int documentIndex)

获取索引为 documentIndex 的文档的打印票据。

Parameters:

参数类型描述
documentIndexint要返回其打印票据的文档索引。

Returns: DocumentPrintTicket - Document’s print ticket.

getJobPrintTicket()

public JobPrintTicket getJobPrintTicket()

返回文档的作业打印票据。

Returns: JobPrintTicket - The document’s job print ticket.

getPage()

public XpsPage getPage()

返回活动页面的 XpsPage 实例。

Returns: XpsPage - The XpsPage instance for active page.

getPageCount()

public int getPageCount()

返回活动文档中的页数。

Returns: int - 活动文档中的页数。

getPagePrintTicket(int documentIndex, int pageIndex)

public PagePrintTicket getPagePrintTicket(int documentIndex, int pageIndex)

获取索引为 documentIndex 的文档中索引为 pageIndex 的页面的打印票据。

Parameters:

参数类型描述
documentIndexint文档的索引。
pageIndexint要返回其打印票据的页面索引。

Returns: PagePrintTicket - Page’s print ticket.

getTotalPageCount()

public int getTotalPageCount()

返回 XPS 文档中所有文档的总页数。

Returns: int - XPS 文档中所有文档的总页数。

getUtils()

public DocumentUtils getUtils()

获取提供超出正式 XPS 操作 API 的实用功能的对象。

Returns: DocumentUtils - The utilities object.

hashCode()

public native int hashCode()

Returns: int

insertCanvas(int index)

public XpsCanvas insertCanvas(int index)

在索引位置 index 将新画布插入到活动页面。

Parameters:

参数类型描述
索引int应插入新 Canvas 的位置。

Returns: XpsCanvas - Inserted canvas.

insertDocument(int index)

public void insertDocument(int index)

在索引位置 index 插入一个使用默认页面尺寸的空文档,并将插入的文档设为活动文档。

Parameters:

参数类型描述
索引int应插入文档的位置。

insertDocument(int index, boolean activate)

public void insertDocument(int index, boolean activate)

在索引位置 index 插入一个使用默认页面尺寸的空文档。

Parameters:

参数类型描述
索引int应插入文档的位置。
激活boolean指示是否将插入的文档设为活动的标志。

insertDocument(int index, float width, float height)

public void insertDocument(int index, float width, float height)

在索引位置 index 插入一个第一页尺寸为 width 和 height 的空文档,并将插入的文档设为活动文档。

Parameters:

参数类型描述
索引int应插入文档的位置。
宽度float第一页的宽度。
高度float第一页的高度。

insertDocument(int index, float width, float height, boolean activate)

public void insertDocument(int index, float width, float height, boolean activate)

在 index position 插入一个空文档,第一页的尺寸为 width 和 height。

Parameters:

参数类型描述
索引int应插入文档的位置。
宽度float第一页的宽度。
高度float第一页的高度。
激活boolean指示是否将插入的文档设为活动的标志。

insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)

public XpsGlyphs insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString)

在 index position 向活动页插入新的字形。

Parameters:

参数类型描述
索引int应插入新 Glyphs 的位置。
fontXpsFont字体资源。
fontSizefloat字体大小。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - Inserted glyphs.

insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

public XpsGlyphs insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)

在 index position 向活动页插入新的字形。

Parameters:

参数类型描述
索引int应插入新 Glyphs 的位置。
fontFamilyjava.lang.String字体族。
fontSizefloat字体大小。
fontStyleXpsFontStyle字体样式。
originXfloat字形原点 X 坐标。
originYfloat字形原点 Y 坐标。
unicodeStringjava.lang.String要打印的字符串。

Returns: XpsGlyphs - Inserted glyphs.

insertPage(int index)

public XpsPage insertPage(int index)

在 index position 插入一个空页到文档,使用默认页面大小,并将插入的页面设为活动页。

Parameters:

参数类型描述
索引int应插入页面的位置。

Returns: XpsPage - Inserted page.

insertPage(int index, boolean activate)

public XpsPage insertPage(int index, boolean activate)

在 index position 插入一个空页到文档,使用默认页面大小。

Parameters:

参数类型描述
索引int应插入页面的位置。
激活boolean指示是否将插入的页面设为活动的标志。

Returns: XpsPage - Inserted page.

insertPage(int index, XpsPage page)

public XpsPage insertPage(int index, XpsPage page)

在 index position 向文档插入一个页面,并将插入的页面设为活动页。

Parameters:

参数类型描述
索引int应添加页面的位置。
pageXpsPage要插入的页面。

Returns: XpsPage - Inserted page.

insertPage(int index, XpsPage page, boolean activate)

public XpsPage insertPage(int index, XpsPage page, boolean activate)

在 index position 向文档插入一个页面。

Parameters:

参数类型描述
索引int应添加页面的位置。
pageXpsPage要插入的页面。
激活boolean指示是否将插入的页面设为活动的标志。

Returns: XpsPage - Inserted page.

insertPage(int index, float width, float height)

public XpsPage insertPage(int index, float width, float height)

在 index position 插入一个空页到文档,使用指定的 width 和 height,并将插入的页面设为活动页。

Parameters:

参数类型描述
索引int应插入页面的位置。
宽度float新页面的宽度。
高度float新页面的高度。

Returns: XpsPage - Inserted page.

insertPage(int index, float width, float height, boolean activate)

public XpsPage insertPage(int index, float width, float height, boolean activate)

在 index position 插入一个空页到文档,使用指定的 width 和 height。

Parameters:

参数类型描述
索引int应插入页面的位置。
宽度float新页面的宽度。
高度float新页面的高度。
激活boolean指示是否将插入的页面设为活动的标志。

Returns: XpsPage - Inserted page.

insertPath(int index, XpsPathGeometry data)

public XpsPath insertPath(int index, XpsPathGeometry data)

在 index position 向活动页插入一个新路径。

Parameters:

参数类型描述
索引int应插入新 Path 的位置。
dataXpsPathGeometry路径的几何形状。

Returns: XpsPath - Inserted path.

isLicensed()

public boolean isLicensed()

指示是否已访问并且有效的 Aspose.Page for Java 产品许可证。

Returns: boolean - 布尔值

merge(String[] filesForMerge, OutputStream outStream)

public void merge(String[] filesForMerge, OutputStream outStream)

将多个 XPS 文件合并为一个 XPS 文档。

Parameters:

参数类型描述
filesForMergejava.lang.String[]用于与此文档合并的 XPS 文件。
outStreamjava.io.OutputStream保存合并后 XPS 文档的输出流。

merge(String[] filesForMerge, String outXpsFilePath)

public void merge(String[] filesForMerge, String outXpsFilePath)

将多个 XPS 文件合并为一个 XPS 文档。

Parameters:

参数类型描述
filesForMergejava.lang.String[]用于与此文档合并的 XPS 文件。
outXpsFilePathjava.lang.String输出 XPS 文件路径。

mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options)

public void mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options)

使用 Device 实例将 XPS 文档合并为 PDF。

Parameters:

参数类型描述
outPdfFilePathjava.lang.String输出 PDF 文件路径。
filesForMergejava.lang.String[]用于与此文档合并并输出到设备的 XPS 文件。
optionsPdfSaveOptions文档保存选项。

mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options)

public void mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options)

使用 Device 实例将 XPS 文档合并为 PDF。

Parameters:

参数类型描述
filesForMergejava.lang.String[]用于与此文档合并并输出到设备的 XPS 文件。
pdfStreamjava.io.OutputStream写入生成的 PDF 的输出流。
optionsPdfSaveOptions文档保存选项。

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeAt(int index)

public XpsContentElement removeAt(int index)

在 index position 从活动页移除一个元素。

Parameters:

参数类型描述
索引int应移除元素的位置。

Returns: XpsContentElement - Removed element.

removeDocumentAt(int index)

public void removeDocumentAt(int index)

在 index position 移除一个文档。

Parameters:

参数类型描述
索引int应删除文档的位置。

removePage(XpsPage page)

public XpsPage removePage(XpsPage page)

从文档中移除一个页面。

Parameters:

参数类型描述
pageXpsPage要删除的页面。

Returns: XpsPage - Removed page.

removePageAt(int index)

public XpsPage removePageAt(int index)

在 index position 从文档中移除一个页面。

Parameters:

参数类型描述
索引int应删除页面的位置。

Returns: XpsPage - Removed page.

save(Device device, SaveOptions options)

public void save(Device device, SaveOptions options)

使用 Device 实例保存文档。

Parameters:

参数类型描述
deviceDevice该 Device 实例。
optionsSaveOptions文档保存选项。

save(OutputStream stream)

public void save(OutputStream stream)

将 XPS 文档保存到流。

Parameters:

参数类型描述
java.io.OutputStream要保存的 XPS 文档流。

save(String path)

public void save(String path)

将 XPS 文档保存到位于 path 的 XPS 文件。

Parameters:

参数类型描述
pathjava.lang.String文档的位置。

saveAsImage(ImageSaveOptions options)

public void saveAsImage(ImageSaveOptions options)

将文档保存为图像文件。输出目录和文件名将与输入 XPS 文件相同。文件扩展名将对应于 "options" 参数中的图像格式。如果文档是使用非 FileInputStream 的流初始化的,图像文件将保存在当前文件夹中,使用默认的文件名模板。

Parameters:

参数类型描述
optionsImageSaveOptions以位图图像格式保存文档的选项。

saveAsImage(ImageSaveOptions options, String outDir, String fileNameTemplate)

public void saveAsImage(ImageSaveOptions options, String outDir, String fileNameTemplate)

将文档保存为图像文件到指定目录并使用指定文件名。文件扩展名将对应于 "options" 参数中的图像格式。

Parameters:

参数类型描述
optionsImageSaveOptions以位图图像格式保存文档的选项。
outDirjava.lang.String图像文件将被保存的输出目录。
fileNameTemplatejava.lang.String图像的文件名模板(不含扩展名)。如果输入 XPS 文件为单页,则恰好为文件名;否则为 "\_[n]",其中 "n" 为从 1 开始的页码,后缀将追加到此。文件扩展名将对应于 "option" 参数中的图像格式。

saveAsImageBytes(ImageSaveOptions options)

public byte[][][] saveAsImageBytes(ImageSaveOptions options)

以位图图像格式将文档保存为字节数组。

Parameters:

参数类型描述
optionsImageSaveOptions以位图图像格式保存文档的选项。

Returns: byte[][][] - 生成的图像字节数组。第一维表示内部文档,第二维表示内部文档中的页面。

saveAsPdf(OutputStream stream, PdfSaveOptions options)

public void saveAsPdf(OutputStream stream, PdfSaveOptions options)

以 PDF 格式保存文档。

Parameters:

参数类型描述
java.io.OutputStream用于写入输出 PDF 文件的流。
optionsPdfSaveOptions以 PDF 格式保存文档的选项。

saveAsPdf(String outPdfFilePath, PdfSaveOptions options)

public void saveAsPdf(String outPdfFilePath, PdfSaveOptions options)

以 PDF 格式保存文档。

Parameters:

参数类型描述
outPdfFilePathjava.lang.String输出 PDF 文件路径。
optionsPdfSaveOptions以 PDF 格式保存文档的选项。

saveAsPs(OutputStream stream, PsSaveOptions options)

public void saveAsPs(OutputStream stream, PsSaveOptions options)

以 PS 格式保存文档。

Parameters:

参数类型描述
java.io.OutputStream用于写入输出 PS 文件的流。
optionsPsSaveOptions以 PS 格式保存文档的选项。

saveAsPs(String outPsFilePath, PsSaveOptions options)

public void saveAsPs(String outPsFilePath, PsSaveOptions options)

以 PostSscript 格式保存文档。

Parameters:

参数类型描述
outPsFilePathjava.lang.String输出 PostScript 文件路径。
optionsPsSaveOptions以 PDF 格式保存文档的选项。

selectActiveDocument(int documentNumber)

public void selectActiveDocument(int documentNumber)

选择一个活动文档进行编辑。

Parameters:

参数类型描述
documentNumberint文档编号。

selectActivePage(int pageNumber)

public XpsPage selectActivePage(int pageNumber)

选择用于编辑的活动文档页。

Parameters:

参数类型描述
pageNumberint页码。

Returns: XpsPage - XpsPage instance for active page.

setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket)

public void setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket)

将 printTicket 链接到由 documentIndex 索引的文档。

Parameters:

参数类型描述
documentIndexint要链接打印票据的文档索引。
printTicketDocumentPrintTicket要链接的打印票据。

setJobPrintTicket(JobPrintTicket value)

public void setJobPrintTicket(JobPrintTicket value)

设置文档的作业打印票据。

Parameters:

参数类型描述
valueJobPrintTicket文档的作业打印票据。

setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket)

public void setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket)

将 printTicket 链接到在由 documentIndex 索引的文档中由 pageIndex 索引的页面。

Parameters:

参数类型描述
documentIndexint文档的索引。
pageIndexint要链接打印票据的页面索引。
printTicketPagePrintTicket要链接的打印票据。

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

参数类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

参数类型描述
arg0long
arg1int