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

Hello,

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:
    BlankEps.zip (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:
    IncorrectEPS.zip (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();
	document.save(device, options);
	psStream.close();

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

	int i = 0;

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

Can you please look into this issue.

Thanks,
Neha

@Neha_Gautam

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

PAGEJAVA-50

PAGEJAVA-51

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.