Convert PS, EPS, and XPS
PS, EPS, and XPS converter API Solution for Java
Whenever there is need to convert PostScript PS and Encapsulated PostScript EPS Files as well as XPS documents programatically, Java API can do it smoothly and converts multiples files. For PS and EPS, API supports Levels 1-3 PostScript operators and the most of the EPS header comments as well as transforms PostScript documents having maximum conformity with an exception of few fonts cases and API deals such fonts as Time New Roman.
Moreover, for XPS file transformation, API can add or remove pages, deals with canvases, paths, and glyph elements, create vector graphics shapes, and text strings, convert XPS outline items, and more.
The API solution for Java here lets you convert files of such PDL formats as PS, EPS, and XPS programmatically, but you may find useful to see and try cross-platform developed on these native APIs.
PostScript to PDF Conversion via Java.
To convert PostScript PS and Encapsulated PostScript EPS files to PDF via Java API you need to take the next steps:
- Load PS or EPS file using PsDocument Class .
- Set the PDF saving options using PdfSaveOptions Class .
- Use FileStream Class for output PDF file.
- Use PdfDevice Class having FileOutputStream object as parameter.
- Call the PsDocument.Save for saving into PDF the file.
Java Code to convert PS EPS to PDF
PostScript to Images Conversion via Java.
For any EPS/PS PostScript to image converter application, the following Java code works well, so take the next steps:
- Initialize input stream with PS source file.
- Create PsDocument object with created PS input stream as a parameter
- Use ImageSaveOptions to specify AdditionalFontsFolder and SuppressError etc.
- Use ImageDevice object for specifying an image type and size if needed.
- Save PS/EPS file as and image with an image save options as an array of arrays of bytes. One array of bytes for one page of an input file.
Java Code for PostScript to Images Conversion
Convert XPS to Images JPG, PNG, BMP via Java.
Java API deals XPS format that is used for representing page layout. In any scenario, whenever there is a need to convert XPS to images BMP, JPG, PNG, and TIFF programmatically, the following code can easily be integrated within the Java application.
- Use XpsDocument class to load the XPS document.
- Use the relevant image option class such as PngSaveOptions , JpegSaveOptions , BmpSaveOptions , TiffSaveOptions for image additional settings.
- Create the image device Class instance.
- Call the XpsDocument.save to save the converted JPEG image into ImageDevice object and then use ImageDevice for saving the image as a JPG.
Java Code for XPS to Image Conversion
FAQ
1. Can I convert Postscript with this API solution?
Aspose.Page has functionality that allows you to convert PS, XPS, and EPS files to other formats online or programmatically. If you need to transform your files instantly online you may like to use Page Description Language format files Converter cross-platform application.
2. What Page description Languages are supported by the converter?
This conversion functionality supports files with .ps, .eps, and .xps extensions. Such famous PDLs as PDF and SVG are represented as separate solutions in Aspose.products
3. Is the functionality free?
The cross-platform converters are free, when for the API solution you can get a free Trial and then buy the product if needed.
Convert XPS to PDF via Java.
The process of converting XPS to PDF documents programmatically is simple having high fidelity results among the input and output files.
- Load the file using XpsDocument class. Initialize PdfSaveOptions class object.
- Create PdfDevice object for rendering and lastly save the output PDF document.
Java Code for XPS to PDF Conversion
Support and Learning Resources
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Release Notes
- Why Aspose.Page for Java?
- Customers List
- Success Stories