Convert EPS to PNG using Java with Aspose.Page for Java - Incorrect output


I am using Aspose.Page to convert EPS files to PNG format in which I am facing following issues:

  1. For most of the EPS files, a blank PNG is generated. Sample EPS files and their PNG output for this issue are: (407.0 KB)

  2. For a few EPS files, output was generated but it was incorrect. The PNG generated has the actual image at the bottom left corner and there is a lot of extra space above and at the right of that image. The PNG should look exactly like the EPS and there should not be any extra blank space surrounding the image. Sample EPS files and their PNG output for this issue are: (338.7 KB)

The sample code used to generate the PNG is:

	FileInputStream psStream = new FileInputStream("filename.eps");
	PsDocument document = new PsDocument(psStream);
	boolean suppressErrors = true;
	ImageSaveOptions options = new ImageSaveOptions(suppressErrors);
	ImageDevice device = new ImageDevice();, options);

	byte[][] imagesBytes = device.getImagesBytes();

	int i = 0;

	for (byte [] imageBytes : imagesBytes) {
	    FileOutputStream fs = new FileOutputStream("filename" + i + ".png");
	    fs.write(imageBytes, 0, imageBytes.length);

Can you please look into this issue.



We were able to replicate the issues in our environment and logged them as following in our issue tracking system:



We will further look into details of these issues and keep you posted with the status of their correction. Please be patient and spare us little time.

We are sorry for the inconvenience.