Java XPS Document Manipulation APIs
Create, Edit and Save XPS documents within Java applications.Download Free Trial
Aspose.XPS for Java
Aspose.XPS for Java allows developers to manipulate XPS documents. API permits the users to create, parse and save XPS files as well as add and remove pages within documents. Furthermore, some of the basic tasks are the creation of canvases, paths and glyphs elements to perform operations such as graphics shapes, text strings and group elements, one can perform by integrating the Java XPS API.
At A Glance
An overview of Aspose.XPS for Java API.
- Solid Color Brush
- Image Brush
- Visual Brush
- Linear Gradient Brush
- Radial Gradient Brush
- ICC Profile
Aspose.XPS for Java fully supports the Java based applications developed in Windows Unix/Linux and Mac platforms.
- JSP/JSF Application
- Desktop Application
Supported File Formats
Aspose.XPS for Java supports XPS at the moment.
- Fixed Layout: XPS
- Fixed Layout: PDF
Advanced Java XPS API Features
Create or edit XPS documents
Add or remove pages within documents
Adjust canvases, paths and glyphs elements
Create vector graphics using a set of primitives
Create text strings
Group elements to treat as a whole
Manipulate graphics & text appearance
Specify colors in different color spaces
Preserve print ticket while processing XPS document
Create or Parse XPS Documents
Aspose.XPS for Java creates XPS files on the fly. API loads existing XPS documents for parsing and manipulation. It can perform different operations like the appearance of graphics and text strings, specify colors in different color spaces, manipulate device configuration information, user intent and much more. Java developers can easily integrate it with just a few lines of code.
Create XPS file from scratch - Java
// create XPS document XpsDocument xps = new XpsDocument(); // add glyph to the document com.aspose.xps.XpsGlyphs glyphs = xps.addGlyphs("Arial", 12, XpsFontStyle.Regular, 300f, 450f, "Hello World!"); glyphs.setFill(xps.createSolidColorBrush(Color.BLACK)); // save result xps.save(dir + "output.xps");