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

Free Support Forum - aspose.com

How to set Japanese font for Doc/ppt to Pdf conversion?

Hi,

While doing evaluation of the Aspose Total for Java, Japanese fonts are not getting converted correctly to pdf. English also shows different font than original document.

Please help for setting the font correctly in Aspose Java. We are using Linux Ubuntu for this evaluation.

Thanks in advance.

Hi Pardeep,

Thanks for your interest in Aspose.Slides.

I have observed the issue statement shared by you and request you to please try using Aspose.Slides for Java 8.4.0 on your end. If there is still an issue then please share the sample presentation, generated PDF, JDK and Operating System details with us. I will investigate the issue further on my end to help you out.

Many Thanks,

Hi Fayyaz,


Thanks for the advise.

I upgraded the Aspose Slides version to 8.4.0. But still the font issue is coming. This happens in Slides and Words as well. Files I used for the test is attached. Please check and update.

It is also found that the cpu usage is going to ~100%. Please advise if there is any method to reduce cpu usage.

Thanks
Pradeep

Hi Pardeep,

I have worked with the sample presentation file shared by you and have been able to observe the issue specified in generated PDF. Actually, the issue is happening owing to missing MS PGothic, MS UI Gothic and AR P丸ゴシック体M fonts on your end. I suggest you to please install the mentioned fonts on your end and then try generating the PDF. For your kind reference, I have attached the generated PDF file on my end as well. You can also call the fonts externally in your application by using the following sample code. The FontPath in the following code is the directory where you will externally place the fonts used in presentation without installing them in Ubuntu.

FontsLoader.loadExternalFonts(new String[]{“FontPath”});

PresentationEx pres=new PresentationEx(path+“SD Japanese.pptx”);

pres.save(path+“SD Japanese.pptx.pdf”, SaveFormat.Pdf);

I hope this will work for you. Please share, if I may help you further in this regard. For CPU usage going to 100% issue, I request you to please share the machine details, operating system , JDK details and snapshot of memory & processor consumption with us. I will investigate the issue further on my end and will try to help you out in this regard as well that whether it is a normal behavior or some performance issue.

For Aspose.Words, I will request my fellow team member to share his feedback in this regard as well.

Many Thanks,

Hi Pradeep,

Please check the following topics for how to set fonts folder in Linux in order to generate output PDFs with correct fonts.

http://www.aspose.com/docs/display/wordsjava/How+Aspose.Words+Uses+True+Type+Fonts

http://www.aspose.com/docs/display/wordsjava/How+to++Specify+True+Type+Fonts+Location

http://www.aspose.com/docs/display/wordsjava/How+to++Install+True+Type+Fonts+on+Linux

http://www.aspose.com/docs/display/wordsjava/How+to+Receive+Notification+of+Missing+Fonts+and+Font+Substitution+during+Rendering

Best Regards,

Thank you for the help.

Copied the font to a specific location and loaded them.

Please help for the following queries:
- Is there any method to list the fonts loaded from the directories specified in : FontSettings.setFontsFolder(“C:\MyFonts\”, false);

- The bullets in the ppt file turned in to another character and icons are missing. Please see the screenshots.

- High CPU and memory usage are detected.
- how the font embedding to output PDF file affect its size?



Hi Pradeep,

I will reply from Aspose.Words perspective.

  1. You can use DocumentVisitor class https://docs.aspose.com/words/java/extract-selected-content-between-nodes/ find all fonts used in the document and then you can find matching fonts from your specified folder to get a list of fonts loaded from that folder.

  2. Did you notice high CPU and memory usage in Words also?

  3. If you are loading fonts from a specific folder, those fonts will affect PDF size and memory usage depending upon the size of fonts. Please check http://www.aspose.com/docs/display/wordsjava/How+to+Specify+How+Fonts+are+Embedded+in+Adobe+PDF+Format 9 for more details.

Best Regards,

Hi Pardeep,

I have observed the snapshot shared for improperly rendered bullets. Again this is owing too missing bullet font on your end. The bullets are using Wingding font which is missing on your end. I have attached the used font for your convenience in this post for your reference. Please use the specified font on your to serve the purpose. Please share, if I may help you further in this regard.

As requested earlier, for CPU usage going to 100% issue, please share the machine details, operating system , JDK details
and snapshot of memory & processor consumption with us. I will
investigate the issue further on my end and will try to help you out in
this regard as well that whether it is a normal behavior or some
performance issue.

Many Thanks,