EPS to PDF Conversion Issue

Dear Team,
Please provide the EPS to PDF conversion java Snippet, I’m tired of your GitHub source, but that is not work for me.

@rjnick

Please check the below Java Code snippet to convert EPS to PDF using Aspose.Page for Java:

try {
 // Initialize PDF output stream
 FileOutputStream pdfStream = new FileOutputStream(dataDir + "PStoPDF.pdf");

 // Initialize PostScript input stream
 FileInputStream psStream = new FileInputStream(dataDir + "FaxTest.eps");

 com.aspose.eps.PsDocument document = new com.aspose.eps.PsDocument(psStream);

 // If you want to convert Postscript file despite of minor errors set this flag
 boolean suppressErrors = true;

 // Initialize options object with necessary parameters.
 com.aspose.eps.device.PdfSaveOptions options = new com.aspose.eps.device.PdfSaveOptions();
 // If you want to add special folder where fonts are stored. Default fonts folder in OS is always included.
 //options.setAdditionalFontsFolders(new String [] {"FONTS_FOLDER"});

 // Default page size is 595x842 and it is not mandatory to set it in PdfDevice
 com.aspose.eps.device.PdfDevice device = new com.aspose.eps.device.PdfDevice(pdfStream);
 // But if you need to specify size and image format use following line
 //com.aspose.eps.device.PdfDevice device = new com.aspose.eps.device.PdfDevice(pdfStream, new Dimension(595, 842));

 try {
  document.save(device, options);
 } finally {
  psStream.close();
  pdfStream.close();
 }

 // Review errors
 if (suppressErrors) {
  for (Exception ex : options.getExceptions()) {
   System.out.println(ex.getMessage());
  }
 }
}catch (Exception ex){
 ex.printStackTrace();
}

I Got Below Error while executing you provided code.

java.lang.UnsupportedOperationException: com.aspose.page.internal.l17.I4l is not supported in this > context.

at com.aspose.page.internal.l01.I717.lif(Unknown Source)
at com.aspose.page.internal.l01.I717.(Unknown Source)
at com.aspose.page.internal.l01.I541.l11(Unknown Source)
at com.aspose.page.internal.l01.I541.lif(Unknown Source)
at com.aspose.page.internal.l01.I561.lI(Unknown Source)
at com.aspose.page.internal.l01.I621.ll(Unknown Source)
at com.aspose.page.internal.l01.I621.ll(Unknown Source)
at com.aspose.page.internal.l01.I621.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)
at com.sps.aspose.EPS2PDF.main(EPS2PDF.java:34)

i attached the eps file also.
Thanks for your response.gr20.zip (1.1 MB)

@rjnick

We were able to reproduce the Exception in our environment as well. Hence, have logged an issue as PAGEJAVA-140 in our issue tracking system. We will further 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.

dear @asad.ali

i Already raise the ticket for this on oct-19,
Please check the thread, and there you mentioned “Ticket was closed” but given solution is not working well .

Thread link : Convert PS/EPS To PDF using Aspose.Page for Java - NullPointerException occurs

Thanks

@rjnick

Could you please share the exact ticket ID about which you are talking about? There are many tickets associated with the referred thread.

1 Like
  • PAGEJAVA-62
  • PAGEJAVA-63
  • PAGEJAVA-64
  • PAGEJAVA-65
  • PAGEJAVA-66
  • PAGEJAVA-67

All the tickets are same issue with diff file

@rjnick

These tickets were resolved only for those EPS files that were provided. For example, PAGEJAVA-65 was logged for gr12.eps and with the fixed-in version, this file can be successfully converted to PDF. Please note that some issues are file specific and they are resolved for those files only. Therefore, a new ticket was logged for your newly provided file. We will inform you as soon as the issue is investigated and resolved.

We apologize for the inconvenience.

Dear @asad.ali

PAGEJAVA - 65 TICKET also not resolved, still there was an issue with converting pdf.

@rjnick

Rendering to PDF issue was fixed. But, while rendering to image, some letters were not rendered. In order to fix it, related issue was created as PAGENET-84. We will surely work over it and let you know once it is resolved. In case you are noticing some other issues, please feel free to share so that they can also be addressed accordingly.

@asad.ali Any update for this

@rjnick

Regretfully, no update is available at the moment as the tickets were logged recently and are pending for review. We will surely investigate and fix them as per the policy of first come first serve and let you know once they are resolved. Please be patient and give us some time.

We are sorry for the inconvenience.