Convert PostScript using API for Java

[ Hide Show ]

This article explains how to convert PS files using Java on the example of PS to TIFF Conversion.

Aspose.Page lets you convert PS files using Java in high-quality BMP, JPG, TIFF, PNG, and PDF documents.

Java PS to TIFF Conversion

You can check the quality of Aspose.Page PS to TIFF conversion and view the results via our free online PostScipt to TIFF Converter or PostScript Viewer

Aspose.Page for Java PS converter allows to convert PostScript (PS) file on any OS for which Java Virtual Machine exists.

Take the next steps in order to perform PS to TIFF conversion:

  1. Create an instance of PsDocument from PostScript file.
  2. Use PdfSaveOptions(or ImageSaveOptions if you convert to an image format) to specify ImageFormat, Size, AdditionalFontsFolder and SuppressError values.
  3. Save the PostScript document as an image with image save options to an array of arrays of bytes. One array of bytes for one page of input document.
  4. Save resulting 2-dimensional arrays of bytes to TIFF files creating for every byte array a new file output stream.
  5. If SuppressErrors value was true, as it is by default, it is possible to see what errors were thrown during the conversion of EPS to TIFF and saved in Exceptions list.

See PS to TIFF conversion in .NET and C++.

Let’s consider ImageSaveOptions. Using this class we can assign different conversion parameters while converting PS to TIFF.

Evaluate PS conversion online with our PS cross-platform Converter. You can convert several PS files instantly and dowload results in a few seconds.

You can download examples and data files from GitHub.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.