PPTX to PDF conversion fails on Amazon AWS Linux OS

The code to convert the PPTX to PDF works fine on Mac and Windows but does not work when deployed to Amazon AWS linux machines.

It works for other file types.





$ uname -a

Linux XXXXXXXXXXXXXXX

3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux





I get the following exceptions

2016-06-10 20:29:59,956 ERROR [stderr] (Thread-136) Exception in thread “Thread-136” java.lang.ExceptionInInitializerError

2016-06-10 20:29:59,957 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.p6a2feef8.p9f36407e.x.do(Unknown Source)

2016-06-10 20:29:59,958 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.p6a2feef8.p9f36407e.x.a(Unknown Source)

2016-06-10 20:29:59,960 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.p6a2feef8.p9f36407e.u.a(Unknown Source)

2016-06-10 20:29:59,961 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Xv.a(Unknown Source)

2016-06-10 20:29:59,962 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Xm.(Unknown Source)

2016-06-10 20:29:59,963 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Xm.a(Unknown Source)

2016-06-10 20:29:59,964 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Ji.a(Unknown Source)

2016-06-10 20:29:59,965 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Ji.a(Unknown Source)

2016-06-10 20:29:59,966 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Iq.a(Unknown Source)

2016-06-10 20:29:59,967 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Iq.a(Unknown Source)

2016-06-10 20:29:59,968 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Iq.do(Unknown Source)

2016-06-10 20:29:59,969 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.Iq.(Unknown Source)

2016-06-10 20:29:59,969 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.nY.a(Unknown Source)

2016-06-10 20:29:59,970 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.nP.a(Unknown Source)

2016-06-10 20:29:59,971 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.nP.try(Unknown Source)

2016-06-10 20:29:59,972 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.He.a(Unknown Source)

2016-06-10 20:29:59,973 ERROR [stderr] (Thread-136) at com.groupdocs.conversion.internal.c.a.s.YO.a(Unknown Source)





Java Code



private String convertToPDF(String fileName) throws InternalException{



try{

ConversionHandler conversionHandler = new ConversionHandler(config);

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();

//Optional parameters

pdfSaveOptions.setSavePath(config.getFileSavePath());

//For excel documents

pdfSaveOptions.setSplitWorksheetIntoPages(false);

pdfSaveOptions.setWorksheetIndex(0);





String savedPath = conversionHandler.convertToPdf(fileName, pdfSaveOptions);

log.debug("PDF Converted File Name "+ savedPath );





return savedPath;

}catch(Exception e){

log.error(“Error occurrred in PDF conversion for File Name” + fileName);

log.trace(e);

e.printStackTrace();

}

return null;

}





Using the following maven artifact



com.groupdocs

groupdocs-conversion

1.3.0

jar





Hello,

Thank you for your inquiry.

Could you please specify which version of the Java JDK you are using on your Linux OS. Also could you please try to add TrueType fonts to your Linux OS (we have attached them to this thread). You can use this instruction for how to install them.

We will wait for your results.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thanks Evgen,





I added the fonts but did not help. Also given below is the java version. It works for docx, xls but does not work for PPTX.



Java Version

java -version

java version “1.8.0_77”

Java™ SE Runtime Environment (build 1.8.0_77-b03)

Java HotSpot™ 64-Bit Server VM (build 25.77-b03, mixed mode)









Added the fonts but did not help



[xx@xx ~]$ cd /usr/share/fonts/

[xx@xx fonts]$ ls

andalemo.ttf calibrii.ttf candarai.ttf consola.ttf corbeli.ttf fonts.dir msttcore trebucbi.ttf webdings.ttf

arialbd.ttf calibri.ttf candara.ttf consolaz.ttf corbel.ttf fonts.scale tahoma.ttf trebucit.ttf

arialbi.ttf calibriz.ttf candaraz.ttf constanb.ttf corbelz.ttf georgiab.ttf timesbd.ttf trebuc.ttf

ariali.ttf cambriab.ttf comicbd.ttf constani.ttf courbd.ttf georgiai.ttf timesbi.ttf verdanab.ttf

arial.ttf cambriai.ttf comic.ttf constan.ttf courbi.ttf georgia.ttf timesi.ttf verdanai.ttf

ariblk.ttf cambriaz.ttf consolab.ttf constanz.ttf couri.ttf georgiaz.ttf times.ttf verdana.ttf

calibrib.ttf candarab.ttf consolai.ttf corbelb.ttf cour.ttf impact.ttf trebucbd.ttf verdanaz.ttf

[xx@xxx fonts]$ cd msttcore

[xx@xx msttcore]$ ls

andalemo.ttf calibrii.ttf candarai.ttf consola.ttf corbeli.ttf fonts.dir tahoma.ttf trebucit.ttf

arialbd.ttf calibri.ttf candara.ttf consolaz.ttf corbel.ttf fonts.scale timesbd.ttf trebuc.ttf

arialbi.ttf calibriz.ttf candaraz.ttf constanb.ttf corbelz.ttf georgiab.ttf timesbi.ttf verdanab.ttf

ariali.ttf cambriab.ttf comicbd.ttf constani.ttf courbd.ttf georgiai.ttf timesi.ttf verdanai.ttf

arial.ttf cambriai.ttf comic.ttf constan.ttf courbi.ttf georgia.ttf times.ttf verdana.ttf

ariblk.ttf cambriaz.ttf consolab.ttf constanz.ttf couri.ttf georgiaz.ttf trebucbd.ttf verdanaz.ttf

calibrib.ttf candarab.ttf consolai.ttf corbelb.ttf cour.ttf impact.ttf trebucbi.ttf webdings.ttf

It worked after installing the fonts provided in the response.



Thanks

Another question on it. The fonts file that you provided had a lot of fonts?? Will we get the fonts file with the OEM license or we need to buy them.



Is that a free file?? It has some MS licensed fonts, do we get them too.



If not, what fonts will we get.



Nitesh

Hello Nitesh,

We glad to hear that your issue was resolved.

Basically, it is a standard fonts for Windows 8.1 and there is no need to include them to our library . So, you can download them from an internet by yourself (for example from this site).

If you will have more questions please feel free to contact us.


----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+