Japanese fonts are lost from EMF metafile after DOC to HTML conversion under Linux/Ubuntu using Java

Hi,
We are using aspose words for Java 11.4 to convert word to html.

The conversion is done on unix system. Please refer attached documents.

  1. During conversion the fonts for the text on diagram seems to be lost. The same font text in other part of diagram is rendered correctly.

For example , for Japanese fonts , the Japanese characters are coming fine above the picture. But the Japanese characters on the picture are not.

  1. In case of other non-jp digram,
    2.1 the text in html above picture is not as clear as in word document.
    2.2 fonts on diagram is different in html.

Could you please let us know the possible cause and if we can do some settings so that fonts get render correctly on picture or otherwise.

Thanks.

Hi Sonali,

Thanks for your query. I have tested the scenario and have not found any issue while using latest version of Aspose.Words for Java. Please use the latest version of Aspose.Words for Java. I have attached the output html file with this post.

Please let us know if you have any more queries.

Hi Tahir,
Thanks.
For non-jp document,still the figure2 heading is not as good as word document.
Also please test with unix and 11.4 as we are using 11.4 and cannot change to latest one.
Thanks.

Hi Sonali,

I have tested the scenario at Linux Operating System and have not found any issue while using latest version of Aspose.Words for Java. Please find the output html file in attachment.

Please note that every new release of Aspose.Words for Java comes up with some new features, enhancements in the existing features and bug fixes. So we suggest you, Please use the latest version of Aspose.Words for Java.

Hi Tahir,

Can we continue to use same 11.4 license we have ,for 11.6 as well? Let us know the process to upgrade to 11.6
Thanks.

Hi Sonali,
Thanks for your query. Every Aspose license carries one-year subscription for free upgrades to new versions released during this time. So, please check the expiration date of your license and upgrade to the newest version. To check an expiration date of your license open the license file using notepad. You will see the following tags:
20120218
It means that you can free upgrade to version of Aspose.Words published before 02/18/2012.
If you need to update to the latest version of Aspose.Words, but your license does not allow you to update to this version, you should contact Aspose sales team to renew your license.
https://forum.aspose.com/c/purchase/6

Hi Tahir,

We found that with latest aspose word for Java11.6 also the issue exists. When we convert the word document to html , the image exported does not show Japanese font correctly. Attached document has a figure with Japanese text.But that text is not coming properly. Japanese text outside figure is coming fine.

Please let us know the workaround as soon as possible.

Hi Sonali,

Thanks for sharing the details. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSJAVA-616 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Tahir,
Can you please let us know when this issue will be resolved? or let us know possible aspose settings if any at the earliest.
Thank you.

Hi Sonali,

Thanks for your request. This issue is pending for analysis and is in the queue. I am afraid, I can’t provide you any reliable estimate at the moment. Once your issue is analyzed, we will then be able to provide you an estimate.

We apologize for your inconvenience.

Hi,
Any update on this?

Hi Sonali,

Thanks for your query. Unfortunately, your issue is not resolved yet. Currently, this issue is pending for analysis and is in the queue. I am afraid, I can’t provide you any reliable estimate at the moment. Once your issue is analyzed, we will then be able to provide you an estimate.

We apologies for your inconvenience.

Hi sonaliag1,
Your document contains not just an image but EMF (Microsoft Extended Metafile) image with embedded MS* fonts. Probably, these Microsoft fonts are unavailable in your Linux system. The best way is to unset default ‘convert metafile to raster’ and the metafile image will be saved to html as is:

Document doc = new Document("Path\\to\\input.doc");
HtmlSaveOptions options = new HtmlSaveOptions();
options.setExportMetafileAsRaster(false);
doc.save("Path\\to\\output.html", options);

But note: user browser should support loading of EMF/WMF. Most of browsers support this option out of the box, but some browsers needs in additional plugins to support Microsoft metafiles.
Best Regards,

Thanks Konstantin.

We tried the setExportMetafileAsRaster(false). It helped with the JP font and arrow lines issue. But the image quality is very poor with this option.

We have lots of EMF data,for which the quality is good enough without this setting.

So instead of using this setting we will like to have these issues fix instead.

We request you to provide us the fix for these 2 issues as early as possible.

WORDSJAVA-616 - JP fonts and

WORDSJAVA-615 - arrow lines

Thanks.

Hi Sonali,

Thanks for the additional information. I have passed this information to our development team. We’ll let you know as soon as we make some progress or resolve these issues. We apologise for any inconvenience.

Best Regards,

Hi Sonali,
Thanks for the new info. Modern browsers do support emfs or do not. Support, but with poor quality – I saw this long time ago:).
The option (setExportMetafileAsRaster(false)) just saves metafile picture as is, without any conversions. Using the sample above you will get two files: output.html and output.001.emf. The former file is windows metafile picture extracted from your source document.
You can check this emf file along – it should be perfect (if your system can display emfs). If your browser displays the html file with linked emf in very poor quality – that means that you browser have poor (and strange) emf plugin. As a workaround you can try another plugins.
About fix. We raised priority and rescheduled J616 on January-February because there are several other similar issues with linux system fonts. We will try all our best but I can’t even promise the fix because: 1) Emf doesn’t support fonts embedding – we can’t pass a font from windows to linux using standard options; 2) Linux doesn’t guarantee exact character mapping from some windows system font to similar linux one.
As a resume you have three workarounds: 1) good emf plugin for user browser; 2) convert all your emfs to bitmaps on windows system; 3) copy absent fonts to linux and convert emfs to bitmaps on linux.
Regards,

The issues you have found earlier (filed as WORDSJAVA-616) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.