Hi,
I am getting the below exception while converting a ppt to pdf
Exception in thread “main” com.aspose.slides.obfuscated.mq: java.lang.UnsupportedOperationException: Cannot find the required font. Name:“Dialog.plain”, Style:, IsExactStyle:false.
at
below is my code to convert it
Presentation presentationDocument = new Presentation("abc.ppt);
presentationDocument.save(“abc.pdf”, SaveFormat.PDF);
Attached is the ppt file, and also to mention I am running it on Linux machine.
Thanks,
Saumil
Hi Saumil,
I have worked with the presentation shared by you using Aspose.Slides for Java 2.6.0 in Windows environment and have observed no issue. Can you please share some information about the Linux environment you have. Can you please try using the mentioned product version. For your kind reference, I have shared the generated PDF.
Thanks and Regards,
Thanks for the reply,
Hi Saumil,
I have tested your presentation in Linux environment and have observed no issue while generating the PDF. I feel there is some issue on your end. As you have mentioned that there has been issue with fonts on your end, you may please need to investigate and resolve the issue on your end please.
Thanks and Regards,
Hi Mudassir,
I am kind of confused as I have created the ppt on my system then how is it possible that those fonts are not getting converted?
Thanks,
Saumil
Hi Saumil,
If you have observed the exception message in your very first post, it is evident that JDK is unable to find the font and it is cause of the issue. Usually, when some font is missing in PowerPoint, it replaces that font with default font for view. I fell the issue is probably related to fonts used in Ole frames but it is my observation only. The “Dialog.Plain” font happens to be unaccessible by JDK and there are two causes for this; either the said font is missing or even if it is present it is not present in fonts.conf file which is accessed by JDK for installed fonts. You may search through your font.conf file for mentioned missing font or you may find some good code help over the internet for finding installed fonts in your system. For reference, please visit the following links as well. In my humble suggestion, you are missing the said font and need to install it.
http://support.hmdc.harvard.edu/book/export/html/1159
http://download.oracle.com/javase/1.3/docs/guide/intl/fontprop.html
http://download.oracle.com/javase/1.3/docs/guide/intl/addingfonts.html
Thanks and Regards,
Yeap totally agreed, today I checked that out and added those fonts in my jre font folder and it worked perfectly . I will check out links that you have mentioned and will try to figure it out the best option.
Works fine for me