XpsDocument
Inheritance: java.lang.Object, com.aspose.page.Document
All Implemented Interfaces: java.io.Closeable
public final class XpsDocument extends Document implements Closeable
Class incapsulating the main entity of XPS document that provides manipulation methods for any XPS element.
Constructors
Constructor | Description |
---|---|
XpsDocument() | Creates empty XPS document with default page size. |
XpsDocument(String path) | Opens an existing XPS document located at the path . |
XpsDocument(InputStream stream, LoadOptions options) | Loads an existing document stored in the stream as XPS document. |
Methods
Method | Description |
---|---|
Adds a content element (Canvas, Path, or Glyphs) | |
Inserts an element (Canvas, Path, or Glyphs) to the active page at index position. | |
Removes an element from the active page. | |
addCanvas() | Adds a new canvas to the active page. |
addDocument() | Adds an empty document with default page size and selects added document as active. |
addDocument(boolean activate) | Adds an empty document with default page size. |
addDocument(float width, float height) | Adds an empty document with the first page dimensions width and height and selects added document as active. |
addDocument(float width, float height, boolean activate) | Adds an empty document with the first page dimensions width and height . |
addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString) | Adds new glyphs to the active page. |
addGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString) | Adds new glyphs to the active page. |
addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target) | Adds an outline entry to the document. |
addPage() | Adds an empty page to the document with default page size. |
addPage(boolean activate) | Adds an empty page to the document with default page size. |
addPage(XpsPage page) | Adds a page to the document and selects added page as active. |
addPage(XpsPage page, boolean activate) | Adds a page to the document. |
addPage(float width, float height) | Adds an empty page to the document with specified width and height . |
addPage(float width, float height, boolean activate) | Adds an empty page to the document with specified width and height . |
addPath(XpsPathGeometry data) | Adds a new path to the active page. |
close() | Disposes the instance. |
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection) | Creates a new stroked elliptical arc segment. |
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection, boolean isStroked) | Creates a new elliptical arc segment. |
createCanvas() | Creates a new canvas. |
createColor(XpsIccProfile iccProfile, float[] components) | Creates a new color in ICC based color space. |
createColor(float r, float g, float b) | Creates a new color in scRGB color space. |
createColor(float a, float r, float g, float b) | Creates a new color in scRGB color space. |
createColor(int r, int g, int b) | Creates a new color in sRGB color space. |
createColor(int a, int r, int g, int b) | Creates a new color in sRGB color space. |
createColor(Color color) | Creates a new color. |
createColor(String path, float[] components) | Creates a new color in ICC based color space. |
createFont(InputStream stream) | Creates a new TrueType font resource out of stream. |
createFont(String fontFamily, XpsFontStyle fontStyle) | Creates a new TrueType font resource. |
createGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString) | Creates new glyphs. |
createGlyphs(String fontFamily, float fontRenderingEmSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString) | Creates new glyphs. |
createGradientStop(XpsColor color, float offset) | Creates a new gradient stop. |
createGradientStop(Color color, float offset) | Creates a new gradient stop. |
createIccProfile(InputStream stream) | Creates a new ICC profile resource out of stream . |
createIccProfile(String iccProfilePath) | Creates a new ICC profile resource out of ICC profile file located at the iccProfilePath . |
createImage(InputStream stream) | Creates a new image resource out of stream . |
createImage(String imagePath) | Creates a new image resource out of image file located at the imagePath . |
createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport) | Creates a new image brush. |
createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport) | Creates a new image brush. |
createLinearGradientBrush(Point2D startPoint, Point2D endPoint) | Creates a new linear gradient brush. |
createLinearGradientBrush(List | Creates a new linear gradient brush. |
createMatrix(float m11, float m12, float m21, float m22, float m31, float m32) | Creates a new affine transformation matrix. |
createPath(XpsPathGeometry data) | Creates a new path. |
createPathFigure(Point2D startPoint) | Creates a new open path figure. |
createPathFigure(Point2D startPoint, boolean isClosed) | Creates a new path figure. |
createPathFigure(Point2D startPoint, List | Creates a new open path figure. |
createPathFigure(Point2D startPoint, List | Creates a new path figure. |
createPathGeometry() | Creates a new path geometry. |
createPathGeometry(String abbreviatedGeometry) | Creates a new path geometry specified with abbreviated form. |
createPathGeometry(List | Creates a new path geometry with specified list of path figures. |
createPolyBezierSegment(Point2D[] points) | Creates a new set of stroked cubic B?zier curves. |
createPolyBezierSegment(Point2D[] points, boolean isStroked) | Creates a new set of cubic B?zier curves. |
createPolyLineSegment(Point2D[] points) | Creates a new stroked polygonal drawing containing an arbitrary number of individual vertices. |
createPolyLineSegment(Point2D[] points, boolean isStroked) | Creates a new polygonal drawing containing an arbitrary number of individual vertices. |
createPolyQuadraticBezierSegment(Point2D[] points) | Creates a new set of stroked quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points. |
createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked) | Creates a new set of quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points. |
createRadialGradientBrush(Point2D center, Point2D gradientOrigin, float radiusX, float radiusY) | Creates a new radial gradient brush. |
createRadialGradientBrush(List | Creates a new radial gradient brush. |
createSolidColorBrush(XpsColor color) | Creates a new solid color brush. |
createSolidColorBrush(Color color) | Creates a new solid color brush. |
createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport) | Creates a new visual brush. |
equals(Object arg0) | |
getActiveDocument() | Returns the active document number. |
getActivePage() | Returns the active page number within the active document. |
getClass() | |
getDocumentCount() | Returns the number of documents inside the XPS package. |
getDocumentPrintTicket(int documentIndex) | Gets the print ticket of the document indexed by documentIndex . |
getJobPrintTicket() | Returns the document’s job print ticket. |
getPage() | Returns the XpsPage instance for active page. |
getPageCount() | Returns the number of pages in the active document. |
getPagePrintTicket(int documentIndex, int pageIndex) | Gets the print ticket of the page indexed by pageIndex in the document indexed by documentIndex . |
getTotalPageCount() | Returns the total number of pages in all documents inside XPS document. |
getUtils() | Gets the object that provides utilities beyond the formal XPS manipulation API. |
hashCode() | |
insertCanvas(int index) | Inserts a new canvas to the active page at index position. |
insertDocument(int index) | Inserts an empty document with default page size at index position and selects inserted document as active. |
insertDocument(int index, boolean activate) | Inserts an empty document with default page size at index position. |
insertDocument(int index, float width, float height) | Inserts an empty document with the first page dimensions width and height at index position and selects inserted document as active. |
insertDocument(int index, float width, float height, boolean activate) | Inserts an empty document with the first page dimensions width and height at index position. |
insertGlyphs(int index, XpsFont font, float fontSize, float originX, float originY, String unicodeString) | Inserts new glyphs to the active page at index position. |
insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString) | Inserts new glyphs to the active page at index position. |
insertPage(int index) | Inserts an empty page to the document with default page size at index position and select inserted page as active. |
insertPage(int index, boolean activate) | Inserts an empty page to the document with default page size at index position. |
insertPage(int index, XpsPage page) | Inserts a page to the document at index position and selects inserted page as active. |
insertPage(int index, XpsPage page, boolean activate) | Inserts a page to the document at index position. |
insertPage(int index, float width, float height) | Inserts an empty page to the document with specified width and height at index position and selects inserted page as active. |
insertPage(int index, float width, float height, boolean activate) | Inserts an empty page to the document with specified width and height at index position. |
insertPath(int index, XpsPathGeometry data) | Inserts a new path to the active page at index position. |
isLicensed() | Indicates whether Aspose.Page for Java product license is accessed and valid. |
merge(String[] filesForMerge, OutputStream outStream) | Merging several XPS files into one XPS document. |
merge(String[] filesForMerge, String outXpsFilePath) | Merging several XPS files into one XPS document. |
mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options) | Merging XPS documents to PDF using the Device instance. |
mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options) | Merging XPS documents to PDF using the Device instance. |
notify() | |
notifyAll() | |
removeAt(int index) | Removes an element at index position from the active page. |
removeDocumentAt(int index) | Removes a document at index position. |
removePage(XpsPage page) | Removes a page from the document. |
removePageAt(int index) | Removes a page from the document at index position. |
save(Device device, SaveOptions options) | Saves the document using the Device instance. |
save(OutputStream stream) | Saves XPS document to stream. |
save(String path) | Saves XPS document to the XPS file located at the path . |
saveAsImage(ImageSaveOptions options) | Saves the document in a bitmap image format. |
saveAsPdf(OutputStream stream, PdfSaveOptions options) | Saves the document in PDF format. |
saveAsPdf(String outPdfFilePath, PdfSaveOptions options) | Saves the document in PDF format. |
saveAsPs(OutputStream stream, PsSaveOptions options) | Saves the document in PS format. |
saveAsPs(String outPsFilePath, PsSaveOptions options) | Saves the document in PostSscript format. |
selectActiveDocument(int documentNumber) | Selects an active document for editing. |
selectActivePage(int pageNumber) | Selects an active document page for editing. |
setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket) | Links the printTicket to the document indexed by documentIndex . |
setJobPrintTicket(JobPrintTicket value) | Sets the document’s job print ticket. |
setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket) | Links the printTicket to the page indexed by pageIndex in the document indexed by documentIndex . |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
XpsDocument()
public XpsDocument()
Creates empty XPS document with default page size.
XpsDocument(String path)
public XpsDocument(String path)
Opens an existing XPS document located at the path .
Parameters:
Parameter | Type | Description |
---|---|---|
path | java.lang.String | Location of the document. |
XpsDocument(InputStream stream, LoadOptions options)
public XpsDocument(InputStream stream, LoadOptions options)
Loads an existing document stored in the stream as XPS document.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | Document stream. |
options | LoadOptions | Document loading options. |
add(T element)
public T <T>add(T element)
Adds a content element (Canvas, Path, or Glyphs)
Parameters:
Parameter | Type | Description |
---|---|---|
element | T | The element to add. |
Returns: T - Added element.
insert(int index, T element)
public T <T>insert(int index, T element)
Inserts an element (Canvas, Path, or Glyphs) to the active page at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which an element should be inserted. |
element | T | The element to insert. |
Returns: T - Inserted element.
remove(T element)
public T <T>remove(T element)
Removes an element from the active page.
Parameters:
Parameter | Type | Description |
---|---|---|
element | T | The element to remove. |
Returns: T - Removed element.
addCanvas()
public XpsCanvas addCanvas()
Adds a new canvas to the active page.
Returns: XpsCanvas - Added canvas.
addDocument()
public void addDocument()
Adds an empty document with default page size and selects added document as active.
addDocument(boolean activate)
public void addDocument(boolean activate)
Adds an empty document with default page size.
Parameters:
Parameter | Type | Description |
---|---|---|
activate | boolean | Flag indicating whether to select added document as active. |
addDocument(float width, float height)
public void addDocument(float width, float height)
Adds an empty document with the first page dimensions width and height and selects added document as active.
Parameters:
Parameter | Type | Description |
---|---|---|
width | float | Width of the first page. |
height | float | Height of the first page. |
addDocument(float width, float height, boolean activate)
public void addDocument(float width, float height, boolean activate)
Adds an empty document with the first page dimensions width and height .
Parameters:
Parameter | Type | Description |
---|---|---|
width | float | Width of the first page. |
height | float | Height of the first page. |
activate | boolean | Flag indicating whether to select added document as active. |
addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)
public XpsGlyphs addGlyphs(XpsFont font, float fontRenderingEmSize, float originX, float originY, String unicodeString)
Adds new glyphs to the active page.
Parameters:
Parameter | Type | Description |
---|---|---|
font | XpsFont | Font resource. |
fontRenderingEmSize | float | Font size. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
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)
Adds new glyphs to the active page.
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | java.lang.String | Font family. |
fontRenderingEmSize | float | Font size. |
fontStyle | XpsFontStyle | Font style. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
Returns: XpsGlyphs - Added glyphs.
addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target)
public void addOutlineEntry(String description, int outlineLevel, XpsHyperlinkTarget target)
Adds an outline entry to the document.
Parameters:
Parameter | Type | Description |
---|---|---|
description | java.lang.String | The entry description. |
outlineLevel | int | The outline level. |
target | XpsHyperlinkTarget | The entry target. |
addPage()
public XpsPage addPage()
Adds an empty page to the document with default page size.
Returns: XpsPage - Added page.
addPage(boolean activate)
public XpsPage addPage(boolean activate)
Adds an empty page to the document with default page size.
Parameters:
Parameter | Type | Description |
---|---|---|
activate | boolean | Flag indicating whether to select added page as active. |
Returns: XpsPage - Added page.
addPage(XpsPage page)
public XpsPage addPage(XpsPage page)
Adds a page to the document and selects added page as active.
Parameters:
Parameter | Type | Description |
---|---|---|
page | XpsPage | Page to be added. |
Returns: XpsPage - Added page.
addPage(XpsPage page, boolean activate)
public XpsPage addPage(XpsPage page, boolean activate)
Adds a page to the document.
Parameters:
Parameter | Type | Description |
---|---|---|
page | XpsPage | Page to be added. |
activate | boolean | Flag indicating whether to select added page as active. |
Returns: XpsPage - Added page.
addPage(float width, float height)
public XpsPage addPage(float width, float height)
Adds an empty page to the document with specified width and height .
Parameters:
Parameter | Type | Description |
---|---|---|
width | float | Width of a new page. |
height | float | Height of a new page. |
Returns: XpsPage - Added page.
addPage(float width, float height, boolean activate)
public XpsPage addPage(float width, float height, boolean activate)
Adds an empty page to the document with specified width and height .
Parameters:
Parameter | Type | Description |
---|---|---|
width | float | Width of a new page. |
height | float | Height of a new page. |
activate | boolean | Flag indicating whether to select added page as active. |
Returns: XpsPage - Added page.
addPath(XpsPathGeometry data)
public XpsPath addPath(XpsPathGeometry data)
Adds a new path to the active page.
Parameters:
Parameter | Type | Description |
---|---|---|
data | XpsPathGeometry | The geometry of the path. |
Returns: XpsPath - Added path.
close()
public void close()
Disposes the instance.
createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)
public XpsArcSegment createArcSegment(Point2D point, Dimension2D size, float rotationAngle, boolean isLargeArc, XpsSweepDirection sweepDirection)
Creates a new stroked elliptical arc segment.
Parameters:
Parameter | Type | Description |
---|---|---|
point | java.awt.geom.Point2D | The end point of the elliptical arc. |
size | java.awt.geom.Dimension2D | The x and y radius of the elliptical arc as an x,y pair. |
rotationAngle | float | Indicates how the ellipse is rotated relative to the current coordinate system. |
isLargeArc | boolean | Determines whether the arc is drawn with a sweep of 180 or greater. |
sweepDirection | XpsSweepDirection | The direction in which the arc is drawn. |
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)
Creates a new elliptical arc segment.
Parameters:
Parameter | Type | Description |
---|---|---|
point | java.awt.geom.Point2D | The end point of the elliptical arc. |
size | java.awt.geom.Dimension2D | The x and y radius of the elliptical arc as an x,y pair. |
rotationAngle | float | Indicates how the ellipse is rotated relative to the current coordinate system. |
isLargeArc | boolean | Determines whether the arc is drawn with a sweep of 180 or greater. |
sweepDirection | XpsSweepDirection | The direction in which the arc is drawn. |
isStroked | boolean | Specifies whether the stroke for this segment of the path is drawn. |
Returns: XpsArcSegment - New elliptical arc segment.
createCanvas()
public XpsCanvas createCanvas()
Creates a new canvas.
Returns: XpsCanvas - New canvas.
createColor(XpsIccProfile iccProfile, float[] components)
public XpsColor createColor(XpsIccProfile iccProfile, float[] components)
Creates a new color in ICC based color space.
Parameters:
Parameter | Type | Description |
---|---|---|
iccProfile | XpsIccProfile | The ICC profile resource. |
components | float[] | Color components. |
Returns: XpsColor - New color.
createColor(float r, float g, float b)
public XpsColor createColor(float r, float g, float b)
Creates a new color in scRGB color space.
Parameters:
Parameter | Type | Description |
---|---|---|
r | float | The red color component. |
g | float | The green color component. |
b | float | The blue color component. |
Returns: XpsColor - New color.
createColor(float a, float r, float g, float b)
public XpsColor createColor(float a, float r, float g, float b)
Creates a new color in scRGB color space.
Parameters:
Parameter | Type | Description |
---|---|---|
a | float | The alpha color component. |
r | float | The red color component. |
g | float | The green color component. |
b | float | The blue color component. |
Returns: XpsColor - New color.
createColor(int r, int g, int b)
public XpsColor createColor(int r, int g, int b)
Creates a new color in sRGB color space.
Parameters:
Parameter | Type | Description |
---|---|---|
r | int | The red color component. |
g | int | The green color component. |
b | int | The blue color component. |
Returns: XpsColor - New color.
createColor(int a, int r, int g, int b)
public XpsColor createColor(int a, int r, int g, int b)
Creates a new color in sRGB color space.
Parameters:
Parameter | Type | Description |
---|---|---|
a | int | The alpha color component. |
r | int | The red color component. |
g | int | The green color component. |
b | int | The blue color component. |
Returns: XpsColor - New color.
createColor(Color color)
public XpsColor createColor(Color color)
Creates a new color.
Parameters:
Parameter | Type | Description |
---|---|---|
color | java.awt.Color | A native color instance for RGB color. |
Returns: XpsColor - New color.
createColor(String path, float[] components)
public XpsColor createColor(String path, float[] components)
Creates a new color in ICC based color space.
Parameters:
Parameter | Type | Description |
---|---|---|
path | java.lang.String | The path to the ICC profile. |
components | float[] | Color components. |
Returns: XpsColor - New color.
createFont(InputStream stream)
public XpsFont createFont(InputStream stream)
Creates a new TrueType font resource out of stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream containing the ICC profile to take as a resource. |
Returns: XpsFont - New TrueType font resource.
createFont(String fontFamily, XpsFontStyle fontStyle)
public XpsFont createFont(String fontFamily, XpsFontStyle fontStyle)
Creates a new TrueType font resource.
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | java.lang.String | The font family. |
fontStyle | XpsFontStyle | The font style. See XpsFont class constants (which are bit flags) for values available to combine. |
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)
Creates new glyphs.
Parameters:
Parameter | Type | Description |
---|---|---|
font | XpsFont | Font resource. |
fontRenderingEmSize | float | Font size. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
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)
Creates new glyphs.
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | java.lang.String | Font family. |
fontRenderingEmSize | float | Font size. |
fontStyle | XpsFontStyle | Font style. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
Returns: XpsGlyphs - New glyphs.
createGradientStop(XpsColor color, float offset)
public XpsGradientStop createGradientStop(XpsColor color, float offset)
Creates a new gradient stop.
Parameters:
Parameter | Type | Description |
---|---|---|
color | XpsColor | The gradient stop color. |
offset | float | The gradient offset. |
Returns: XpsGradientStop - New gradient stop.
createGradientStop(Color color, float offset)
public XpsGradientStop createGradientStop(Color color, float offset)
Creates a new gradient stop.
Parameters:
Parameter | Type | Description |
---|---|---|
color | java.awt.Color | The gradient stop color. |
offset | float | The gradient offset. |
Returns: XpsGradientStop - New gradient stop.
createIccProfile(InputStream stream)
public XpsIccProfile createIccProfile(InputStream stream)
Creates a new ICC profile resource out of stream .
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream containing the ICC profile to take as a resource. |
Returns: XpsIccProfile - New ICC profile resource.
createIccProfile(String iccProfilePath)
public XpsIccProfile createIccProfile(String iccProfilePath)
Creates a new ICC profile resource out of ICC profile file located at the iccProfilePath .
Parameters:
Parameter | Type | Description |
---|---|---|
iccProfilePath | java.lang.String | The path to the ICC profile to take as a resource. |
Returns: XpsIccProfile - New ICC profile resource.
createImage(InputStream stream)
public XpsImage createImage(InputStream stream)
Creates a new image resource out of stream .
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream containing the image to take as a resource. |
Returns: XpsImage - New image resource.
createImage(String imagePath)
public XpsImage createImage(String imagePath)
Creates a new image resource out of image file located at the imagePath .
Parameters:
Parameter | Type | Description |
---|---|---|
imagePath | java.lang.String | The path to the image to take as a resource. |
Returns: XpsImage - New image resource.
createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)
public XpsImageBrush createImageBrush(XpsImage image, Rectangle2D viewbox, Rectangle2D viewport)
Creates a new image brush.
Parameters:
Parameter | Type | Description |
---|---|---|
image | XpsImage | An image resource. |
viewbox | java.awt.geom.Rectangle2D | The position and dimensions of the brush’s source content. |
viewport | java.awt.geom.Rectangle2D | The region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied |
Returns: XpsImageBrush - New image brush.
createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)
public XpsImageBrush createImageBrush(String imagePath, Rectangle2D viewbox, Rectangle2D viewport)
Creates a new image brush.
Parameters:
Parameter | Type | Description |
---|---|---|
imagePath | java.lang.String | The path to the image to take as a brush tile. |
viewbox | java.awt.geom.Rectangle2D | The position and dimensions of the brush’s source content. |
viewport | java.awt.geom.Rectangle2D | The region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied |
Returns: XpsImageBrush - New image brush.
createLinearGradientBrush(Point2D startPoint, Point2D endPoint)
public XpsLinearGradientBrush createLinearGradientBrush(Point2D startPoint, Point2D endPoint)
Creates a new linear gradient brush.
Parameters:
Parameter | Type | Description |
---|---|---|
startPoint | java.awt.geom.Point2D | The starting point of the linear gradient. |
endPoint | java.awt.geom.Point2D | The end point of the linear gradient. |
Returns: XpsLinearGradientBrush - New linear gradient brush.
createLinearGradientBrush(List gradientStops, Point2D startPoint, Point2D endPoint)
public XpsLinearGradientBrush createLinearGradientBrush(List<XpsGradientStop> gradientStops, Point2D startPoint, Point2D endPoint)
Creates a new linear gradient brush.
Parameters:
Parameter | Type | Description |
---|---|---|
gradientStops | java.util.List<com.aspose.xps.XpsGradientStop> | The list of gradient stops. |
startPoint | java.awt.geom.Point2D | The starting point of the linear gradient. |
endPoint | java.awt.geom.Point2D | The end point of the linear gradient. |
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)
Creates a new affine transformation matrix.
Parameters:
Parameter | Type | Description |
---|---|---|
m11 | float | Element 11. |
m12 | float | Element 12. |
m21 | float | Element 21. |
m22 | float | Element 22. |
m31 | float | Element 31. |
m32 | float | Element 32. |
Returns: XpsMatrix - New affine transformation matrix.
createPath(XpsPathGeometry data)
public XpsPath createPath(XpsPathGeometry data)
Creates a new path.
Parameters:
Parameter | Type | Description |
---|---|---|
data | XpsPathGeometry | The geometry of the path. |
Returns: XpsPath - New path.
createPathFigure(Point2D startPoint)
public XpsPathFigure createPathFigure(Point2D startPoint)
Creates a new open path figure.
Parameters:
Parameter | Type | Description |
---|---|---|
startPoint | java.awt.geom.Point2D | The starting point for the first segment of the path figure. |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, boolean isClosed)
public XpsPathFigure createPathFigure(Point2D startPoint, boolean isClosed)
Creates a new path figure.
Parameters:
Parameter | Type | Description |
---|---|---|
startPoint | java.awt.geom.Point2D | The starting point for the first segment of the path figure. |
isClosed | boolean | Specifies whether the path is closed. If set to true, the stroke is drawn “closed”, that is, the last point in the last segment of the path figure is connected with the point specified in the StartPoint attribute, otherwise the stroke is drawn “open”, and the last point is not connected to the start point. Only applicable if the path figure is used in a Path element that specifies a stroke. |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, List segments)
public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments)
Creates a new open path figure.
Parameters:
Parameter | Type | Description |
---|---|---|
startPoint | java.awt.geom.Point2D | The starting point for the first segment of the path figure. |
segments | java.util.List<com.aspose.xps.XpsPathSegment> | List of path segments. |
Returns: XpsPathFigure - New path figure.
createPathFigure(Point2D startPoint, List segments, boolean isClosed)
public XpsPathFigure createPathFigure(Point2D startPoint, List<XpsPathSegment> segments, boolean isClosed)
Creates a new path figure.
Parameters:
Parameter | Type | Description |
---|---|---|
startPoint | java.awt.geom.Point2D | The starting point for the first segment of the path figure. |
segments | java.util.List<com.aspose.xps.XpsPathSegment> | List of path segments. |
isClosed | boolean | Specifies whether the path is closed. If set to true, the stroke is drawn “closed”, that is, the last point in the last segment of the path figure is connected with the point specified in the StartPoint attribute, otherwise the stroke is drawn “open”, and the last point is not connected to the start point. Only applicable if the path figure is used in a Path element that specifies a stroke. |
Returns: XpsPathFigure - New path figure.
createPathGeometry()
public XpsPathGeometry createPathGeometry()
Creates a new path geometry.
Returns: XpsPathGeometry - New path geometry.
createPathGeometry(String abbreviatedGeometry)
public XpsPathGeometry createPathGeometry(String abbreviatedGeometry)
Creates a new path geometry specified with abbreviated form.
Parameters:
Parameter | Type | Description |
---|---|---|
abbreviatedGeometry | java.lang.String | Abbreviated form of path geometry. |
Returns: XpsPathGeometry - New path geometry.
createPathGeometry(List pathFigures)
public XpsPathGeometry createPathGeometry(List<XpsPathFigure> pathFigures)
Creates a new path geometry with specified list of path figures.
Parameters:
Parameter | Type | Description |
---|---|---|
pathFigures | java.util.List<com.aspose.xps.XpsPathFigure> | List of path figures. |
Returns: XpsPathGeometry - New path geometry.
createPolyBezierSegment(Point2D[] points)
public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points)
Creates a new set of stroked cubic B?zier curves.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | Control points for multiple B?zier segments. |
Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.
createPolyBezierSegment(Point2D[] points, boolean isStroked)
public XpsPolyBezierSegment createPolyBezierSegment(Point2D[] points, boolean isStroked)
Creates a new set of cubic B?zier curves.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | Control points for multiple B?zier segments. |
isStroked | boolean | Specifies whether the stroke for this segment of the path is drawn. |
Returns: XpsPolyBezierSegment - New cubic B?zier curves segment.
createPolyLineSegment(Point2D[] points)
public XpsPolyLineSegment createPolyLineSegment(Point2D[] points)
Creates a new stroked polygonal drawing containing an arbitrary number of individual vertices.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | A set of coordinates for the multiple segments that define the poly line segment. |
Returns: XpsPolyLineSegment - New polygonal drawing segment.
createPolyLineSegment(Point2D[] points, boolean isStroked)
public XpsPolyLineSegment createPolyLineSegment(Point2D[] points, boolean isStroked)
Creates a new polygonal drawing containing an arbitrary number of individual vertices.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | A set of coordinates for the multiple segments that define the poly line segment. |
isStroked | boolean | Specifies whether the stroke for this segment of the path is drawn. |
Returns: XpsPolyLineSegment - New polygonal drawing segment.
createPolyQuadraticBezierSegment(Point2D[] points)
public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points)
Creates a new set of stroked quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | Control points for multiple quadratic B?zier segments. |
Returns: XpsPolyQuadraticBezierSegment - New quadratic B?zier curves segment.
createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)
public XpsPolyQuadraticBezierSegment createPolyQuadraticBezierSegment(Point2D[] points, boolean isStroked)
Creates a new set of quadratic B?zier curves from the previous point in the path figure through a set of vertices, using specified control points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | Control points for multiple quadratic B?zier segments. |
isStroked | boolean | Specifies whether the stroke for this segment of the path is drawn. |
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)
Creates a new radial gradient brush.
Parameters:
Parameter | Type | Description |
---|---|---|
center | java.awt.geom.Point2D | The center point of the radial gradient (that is, the center of the ellipse). |
gradientOrigin | java.awt.geom.Point2D | The origin point of the radial gradient. |
radiusX | float | The radius in the x dimension of the ellipse which defines the radial gradient. |
radiusY | float | The radius in the y dimension of the ellipse which defines the radial gradient. |
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)
Creates a new radial gradient brush.
Parameters:
Parameter | Type | Description |
---|---|---|
gradientStops | java.util.List<com.aspose.xps.XpsGradientStop> | The list of gradient stops. |
center | java.awt.geom.Point2D | The center point of the radial gradient (that is, the center of the ellipse). |
gradientOrigin | java.awt.geom.Point2D | The origin point of the radial gradient. |
radiusX | float | The radius in the x dimension of the ellipse which defines the radial gradient. |
radiusY | float | The radius in the y dimension of the ellipse which defines the radial gradient. |
Returns: XpsRadialGradientBrush - New radial gradient brush.
createSolidColorBrush(XpsColor color)
public XpsSolidColorBrush createSolidColorBrush(XpsColor color)
Creates a new solid color brush.
Parameters:
Parameter | Type | Description |
---|---|---|
color | XpsColor | The color for filled elements. |
Returns: XpsSolidColorBrush - New solid color brush.
createSolidColorBrush(Color color)
public XpsSolidColorBrush createSolidColorBrush(Color color)
Creates a new solid color brush.
Parameters:
Parameter | Type | Description |
---|---|---|
color | java.awt.Color | The color for filled elements. |
Returns: XpsSolidColorBrush - New solid color brush.
createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)
public XpsVisualBrush createVisualBrush(XpsContentElement element, Rectangle2D viewbox, Rectangle2D viewport)
Creates a new visual brush.
Parameters:
Parameter | Type | Description |
---|---|---|
element | XpsContentElement | The XPS element (Canvas, Path or Glyphs) for Visual property od visual brush. |
viewbox | java.awt.geom.Rectangle2D | The position and dimensions of the brush’s source content. |
viewport | java.awt.geom.Rectangle2D | The region in the containing coordinate space of the prime brush tile that is (possibly repeatedly) applied to fill the region to which the brush is applied |
Returns: XpsVisualBrush - New visual brush.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getActiveDocument()
public int getActiveDocument()
Returns the active document number.
Returns: int - The int value.
getActivePage()
public int getActivePage()
Returns the active page number within the active document.
Returns: int - The int value.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDocumentCount()
public int getDocumentCount()
Returns the number of documents inside the XPS package.
Returns: int - The number of documents inside the XPS package.
getDocumentPrintTicket(int documentIndex)
public DocumentPrintTicket getDocumentPrintTicket(int documentIndex)
Gets the print ticket of the document indexed by documentIndex .
Parameters:
Parameter | Type | Description |
---|---|---|
documentIndex | int | Index of the document whose print ticket to return. |
Returns: DocumentPrintTicket - Document’s print ticket.
getJobPrintTicket()
public JobPrintTicket getJobPrintTicket()
Returns the document’s job print ticket.
Returns: JobPrintTicket - The document’s job print ticket.
getPage()
public XpsPage getPage()
Returns the XpsPage instance for active page.
Returns: XpsPage - The XpsPage instance for active page.
getPageCount()
public int getPageCount()
Returns the number of pages in the active document.
Returns: int - The number of pages in the active document.
getPagePrintTicket(int documentIndex, int pageIndex)
public PagePrintTicket getPagePrintTicket(int documentIndex, int pageIndex)
Gets the print ticket of the page indexed by pageIndex in the document indexed by documentIndex .
Parameters:
Parameter | Type | Description |
---|---|---|
documentIndex | int | Index of the document. |
pageIndex | int | Index of the page whose print ticket to return. |
Returns: PagePrintTicket - Page’s print ticket.
getTotalPageCount()
public int getTotalPageCount()
Returns the total number of pages in all documents inside XPS document.
Returns: int - The total number of pages in all documents inside XPS document.
getUtils()
public DocumentUtils getUtils()
Gets the object that provides utilities beyond the formal XPS manipulation API.
Returns: DocumentUtils - The utilities object.
hashCode()
public native int hashCode()
Returns: int
insertCanvas(int index)
public XpsCanvas insertCanvas(int index)
Inserts a new canvas to the active page at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a new canvas should be inserted. |
Returns: XpsCanvas - Inserted canvas.
insertDocument(int index)
public void insertDocument(int index)
Inserts an empty document with default page size at index position and selects inserted document as active.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a document should be inserted. |
insertDocument(int index, boolean activate)
public void insertDocument(int index, boolean activate)
Inserts an empty document with default page size at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a document should be inserted. |
activate | boolean | Flag indicating whether to select inserted document as active. |
insertDocument(int index, float width, float height)
public void insertDocument(int index, float width, float height)
Inserts an empty document with the first page dimensions width and height at index position and selects inserted document as active.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a document should be inserted. |
width | float | Width of the first page. |
height | float | Height of the first page. |
insertDocument(int index, float width, float height, boolean activate)
public void insertDocument(int index, float width, float height, boolean activate)
Inserts an empty document with the first page dimensions width and height at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a document should be inserted. |
width | float | Width of the first page. |
height | float | Height of the first page. |
activate | boolean | Flag indicating whether to select inserted document as active. |
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)
Inserts new glyphs to the active page at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which new glyphs should be inserted. |
font | XpsFont | Font resource. |
fontSize | float | Font size. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
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)
Inserts new glyphs to the active page at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which new glyphs should be inserted. |
fontFamily | java.lang.String | Font family. |
fontSize | float | Font size. |
fontStyle | XpsFontStyle | Font style. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin Y coordinate. |
unicodeString | java.lang.String | String to be printed. |
Returns: XpsGlyphs - Inserted glyphs.
insertPage(int index)
public XpsPage insertPage(int index)
Inserts an empty page to the document with default page size at index position and select inserted page as active.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be inserted. |
Returns: XpsPage - Inserted page.
insertPage(int index, boolean activate)
public XpsPage insertPage(int index, boolean activate)
Inserts an empty page to the document with default page size at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be inserted. |
activate | boolean | Flag indicating whether to select inserted page as active. |
Returns: XpsPage - Inserted page.
insertPage(int index, XpsPage page)
public XpsPage insertPage(int index, XpsPage page)
Inserts a page to the document at index position and selects inserted page as active.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be added. |
page | XpsPage | Page to be inserted. |
Returns: XpsPage - Inserted page.
insertPage(int index, XpsPage page, boolean activate)
public XpsPage insertPage(int index, XpsPage page, boolean activate)
Inserts a page to the document at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be added. |
page | XpsPage | Page to be inserted. |
activate | boolean | Flag indicating whether to select inserted page as active. |
Returns: XpsPage - Inserted page.
insertPage(int index, float width, float height)
public XpsPage insertPage(int index, float width, float height)
Inserts an empty page to the document with specified width and height at index position and selects inserted page as active.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be inserted. |
width | float | Width of a new page. |
height | float | Height of a new page. |
Returns: XpsPage - Inserted page.
insertPage(int index, float width, float height, boolean activate)
public XpsPage insertPage(int index, float width, float height, boolean activate)
Inserts an empty page to the document with specified width and height at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be inserted. |
width | float | Width of a new page. |
height | float | Height of a new page. |
activate | boolean | Flag indicating whether to select inserted page as active. |
Returns: XpsPage - Inserted page.
insertPath(int index, XpsPathGeometry data)
public XpsPath insertPath(int index, XpsPathGeometry data)
Inserts a new path to the active page at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a new path should be inserted. |
data | XpsPathGeometry | The geometry of the path. |
Returns: XpsPath - Inserted path.
isLicensed()
public boolean isLicensed()
Indicates whether Aspose.Page for Java product license is accessed and valid.
Returns: boolean - boolean value
merge(String[] filesForMerge, OutputStream outStream)
public void merge(String[] filesForMerge, OutputStream outStream)
Merging several XPS files into one XPS document.
Parameters:
Parameter | Type | Description |
---|---|---|
filesForMerge | java.lang.String[] | XPS files for merging with this document. |
outStream | java.io.OutputStream | The output stream where to save merged XPS documents. |
merge(String[] filesForMerge, String outXpsFilePath)
public void merge(String[] filesForMerge, String outXpsFilePath)
Merging several XPS files into one XPS document.
Parameters:
Parameter | Type | Description |
---|---|---|
filesForMerge | java.lang.String[] | XPS files for merging with this document. |
outXpsFilePath | java.lang.String | The output XPS file path. |
mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options)
public void mergeToPdf(String outPdfFilePath, String[] filesForMerge, PdfSaveOptions options)
Merging XPS documents to PDF using the Device instance.
Parameters:
Parameter | Type | Description |
---|---|---|
outPdfFilePath | java.lang.String | The output PDF file path. |
filesForMerge | java.lang.String[] | XPS files for merging with this document to an output device. |
options | PdfSaveOptions | Document saving options. |
mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options)
public void mergeToPdf(String[] filesForMerge, OutputStream pdfStream, PdfSaveOptions options)
Merging XPS documents to PDF using the Device instance.
Parameters:
Parameter | Type | Description |
---|---|---|
filesForMerge | java.lang.String[] | XPS files for merging with this document to an output device. |
pdfStream | java.io.OutputStream | The output stream to write the resulting PDF to. |
options | PdfSaveOptions | Document saving options. |
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
removeAt(int index)
public XpsContentElement removeAt(int index)
Removes an element at index position from the active page.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which element should be removed. |
Returns: XpsContentElement - Removed element.
removeDocumentAt(int index)
public void removeDocumentAt(int index)
Removes a document at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a document should be removed. |
removePage(XpsPage page)
public XpsPage removePage(XpsPage page)
Removes a page from the document.
Parameters:
Parameter | Type | Description |
---|---|---|
page | XpsPage | Page to be removed. |
Returns: XpsPage - Removed page.
removePageAt(int index)
public XpsPage removePageAt(int index)
Removes a page from the document at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a page should be removed. |
Returns: XpsPage - Removed page.
save(Device device, SaveOptions options)
public void save(Device device, SaveOptions options)
Saves the document using the Device instance.
Parameters:
Parameter | Type | Description |
---|---|---|
device | Device | The Device instance. |
options | SaveOptions | Document saving options. |
save(OutputStream stream)
public void save(OutputStream stream)
Saves XPS document to stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | Stream XPS document to be saved into. |
save(String path)
public void save(String path)
Saves XPS document to the XPS file located at the path .
Parameters:
Parameter | Type | Description |
---|---|---|
path | java.lang.String | Location of the document. |
saveAsImage(ImageSaveOptions options)
public byte[][][] saveAsImage(ImageSaveOptions options)
Saves the document in a bitmap image format.
Parameters:
Parameter | Type | Description |
---|---|---|
options | ImageSaveOptions | Options for saving the document in a bitmap image format. |
Returns: byte[][][] - The resulting images byte arrays. The first dimension is for inner documents and the second one is for pages within inner documents.
saveAsPdf(OutputStream stream, PdfSaveOptions options)
public void saveAsPdf(OutputStream stream, PdfSaveOptions options)
Saves the document in PDF format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The stream to write the output PDF file to. |
options | PdfSaveOptions | Options for saving the document in PDF format. |
saveAsPdf(String outPdfFilePath, PdfSaveOptions options)
public void saveAsPdf(String outPdfFilePath, PdfSaveOptions options)
Saves the document in PDF format.
Parameters:
Parameter | Type | Description |
---|---|---|
outPdfFilePath | java.lang.String | The output PDF file path. |
options | PdfSaveOptions | Options for saving the document in PDF format. |
saveAsPs(OutputStream stream, PsSaveOptions options)
public void saveAsPs(OutputStream stream, PsSaveOptions options)
Saves the document in PS format.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | The stream to write the output PS file to. |
options | PsSaveOptions | Options for saving the document in PS format. |
saveAsPs(String outPsFilePath, PsSaveOptions options)
public void saveAsPs(String outPsFilePath, PsSaveOptions options)
Saves the document in PostSscript format.
Parameters:
Parameter | Type | Description |
---|---|---|
outPsFilePath | java.lang.String | The output PostScript file path. |
options | PsSaveOptions | Options for saving the document in PDF format. |
selectActiveDocument(int documentNumber)
public void selectActiveDocument(int documentNumber)
Selects an active document for editing.
Parameters:
Parameter | Type | Description |
---|---|---|
documentNumber | int | A document number. |
selectActivePage(int pageNumber)
public XpsPage selectActivePage(int pageNumber)
Selects an active document page for editing.
Parameters:
Parameter | Type | Description |
---|---|---|
pageNumber | int | A page number. |
Returns: XpsPage - XpsPage instance for active page.
setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket)
public void setDocumentPrintTicket(int documentIndex, DocumentPrintTicket printTicket)
Links the printTicket to the document indexed by documentIndex .
Parameters:
Parameter | Type | Description |
---|---|---|
documentIndex | int | Index of the document to link the print ticket to. |
printTicket | DocumentPrintTicket | The print ticket to link. |
setJobPrintTicket(JobPrintTicket value)
public void setJobPrintTicket(JobPrintTicket value)
Sets the document’s job print ticket.
Parameters:
Parameter | Type | Description |
---|---|---|
value | JobPrintTicket | The document’s job print ticket. |
setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket)
public void setPagePrintTicket(int documentIndex, int pageIndex, PagePrintTicket printTicket)
Links the printTicket to the page indexed by pageIndex in the document indexed by documentIndex .
Parameters:
Parameter | Type | Description |
---|---|---|
documentIndex | int | Index of the document. |
pageIndex | int | Index of the page to link the print ticket to. |
printTicket | PagePrintTicket | The print ticket to link. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |