We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot convert EPS file

Hello, I try to implement functionality which converts EPS files to PNG with Aspose.Pages library.
I have easy snippet:

FileInputStream inputStream = new FileInputStream(inputEPS);
ImageSaveOptions options = new ImageSaveOptions(true);
ImageDevice device = new ImageDevice();
PsDocument document = new PsDocument(inputStream);
document.save(device, options);

But for filefile.zip (380.9 KB)
I receive ugly exception:

Exception in thread "main" java.lang.NullPointerException
at com.aspose.page.internal.l04.I95I.lif(Unknown Source)
at com.aspose.page.internal.l04.I57I.lIF(Unknown Source)
at com.aspose.page.internal.l04.I63I.ll(Unknown Source)
at com.aspose.page.internal.l04.I63I.ll(Unknown Source)
at com.aspose.page.internal.l04.I63I.lI(Unknown Source)
at com.aspose.eps.PsDocument.lI(Unknown Source)
at com.aspose.eps.PsDocument.lif(Unknown Source)
at com.aspose.eps.PsDocument.save(Unknown Source)

Can I know where is the problem? In you page Convert Images, Photos, Pictures Online (aspose.app) this image can be converted without problem.

I also notice that files which do not have image size in header like:

%%BoundingBox: 0 0 0 0
%%HiResBoundingBox: 0 0 0 0
%%CropBox: 0 0 0 0
%%LanguageLevel: 2
%%DocumentData: Clean7Bit
%ADOBeginClientInjection: DocumentHeader "AI11EPS"
%%AI8_CreatorVersion: 16.0.0
%ADO_BuildNumber: Adobe Illustrator(R) 16.0.0 x682 R agm 4.6676 ct 5.2591
%ADO_ContainsXMP: MainFirst

will be also problematic and library does not allow to convert it with error that size is unknown, but other apps which can handle EPS does not have any problem with that


We are checking it and will get back to you shortly.


We were able to notice the issue in our environment using 22.9 version of the API. Hence, it has been logged as PAGEJAVA-194 in our issue tracking system for further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.