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

Free Support Forum - aspose.com

List Label does not display correctly in browser at Mac or Linux using C#

Hi,

We are using Aspose word dll version 10.5.0.0 to generate word document, where input is word document.

We are taking the HTML format of the input word document using the following code:

string htmlText = string.Empty;
string lStrImageFolder = string.Empty;
lStrImageFolder = FolderPath + “/” + ConfigurationManager.AppSettings[“HTMLFileFolderName”].ToString();
string tempDir = Path.Combine(Server.MapPath(lStrImageFolder));
if (!Directory.Exists(tempDir))
Directory.CreateDirectory(tempDir);

Aspose.Words.Saving.HtmlSaveOptions saveOptions = new Aspose.Words.Saving.HtmlSaveOptions();
saveOptions.ImagesFolder = tempDir;
saveOptions.CssStyleSheetType = Aspose.Words.Saving.CssStyleSheetType.Embedded;
saveOptions.SaveFormat=SaveFormat.Html;
saveOptions.ImagesFolderAlias = ConfigurationManager.AppSettings[“HTMLFileFolderName”].ToString();
MemoryStream htmlStream = new MemoryStream();
doc.Save(htmlStream, saveOptions);
htmlText = Encoding.UTF8.GetString(htmlStream.GetBuffer());
htmlStream.Close();

In input word document (PFA) there are some special symbols but in the Aspose HTML(PFA) we are getting only font family of that symbol not the charater code of that symbol for example the below highlight special symbole’s font family is
wingdings and charater code is 224



So is there any way we can get character code with the font family in the generated HTML so that we can identify which speical symbol used in input word document.

Please let us know if any solution is possible

Thanks,
Samanvay

Hi Samanvay,

Thanks for your inquiry. While using the latest version of Aspose.Words i.e 10.8.0, I was unable to reproduce any such issue on my side. The specified special symbol, upon converting to HTML, was rendered perfectly on my side. For your reference, I have attached here the HTML (out.html) i.e. generated on my side.

Moreover, I would suggest you please visit the following link for downloading and using the latest version of Aspose.Words:
https://downloads.aspose.com/words/net

I hope, this will help.

<!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Arial","sans-serif"; mso-ascii-font-family:Arial; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Arial; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–><span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:“Times New Roman”;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>Hi



Thanks for your quick response.



We do not have any problem on generating html. we have only concern with html
tag of special symbol in generating html.In your generated HTML we have only
found the following tag for the corresponding symbol.



à



which show only font family of that symbol not character code or any
identification.



when we generated the word document using this HTML we need some identification
for symbol used in Input HTML


so Is there any solution in which we can get charater code or any idetification in
HTML.



Thanks

Hi Samanvay,

Thanks for sharing the information. The Aspose.Words mimics the MS Word behavior upon
converting documents to HTML. If you convert .docx file to HTML by using MS word and open that HTML, you will experience the same behavior. However, I will discuss this scenario with our development team and will share the workaround, If there is any.

Hi



I
hope you’re doing well. Are you able to get any
workaround of these problem at your
end so that we can get some more information of special symbol in generating HTML.


Thanks

Samanvay.

Hi Samanvay,

Please use the following code snippet for workaround. Hope this helps you.

Document doc = new Document(MyDir + "InputDoc1.docx");

doc.Save(MyDir + "out.html");

doc = new Document(MyDir + "out.html");

doc.Range.Replace("à", "→", false, true);

doc.Save(MyDir + "out.html");

Hello,
we are using Aspose.Words 14.12.0.0. and still facing the same issue, well in our case it is the reason the symbols in words are made using the Symbol font when you save a word document as html file.

This works fine if you use Internet Explorer, but on Chrome, Safari and Firefox you do not get correct data. Those chars should be handled as entities.
So can Aspose replace / handle those chars the correct way when saving as html file ?

See also here: https://developer.mozilla.org/en-US/docs/Mozilla_Web_Developer_FAQ#Why_aren.E2.80.99t_symbol.2Fdingbat_fonts_working.3F

Bye Yves

Hi Yves,

Thanks for your inquiry. I have tested the scenario and have not found the shared issue. I suggest you please upgrade to the latest version of Aspose.Words for .NET 15.7.0 and let us know how it goes on your side. If you still face problem, please share your input word document here for testing purposes. I will investigate the issue on my side and provide you more information.

Hello,


thanks for the feedback. I tried the latest version but unfortunately the problem still exists.
I added a word document to show the problem. In this Page there is a list of 3 items where I changed the symbol of the list item. In this case the export will use the font WingDings.

Result is

      Eintrag 1 And also a €


So I hope this can show the case.

Add: Check results on Mac OS X or Linux with Chrome of Firefox! Works on IE in Windows.

Hi Yves,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12264. 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.

Hello,

thank you for the feedback. Any idea how long this will take in average? Weeks, Months or more?

Bye Yves

Hi Yves,

Thanks for your inquiry. I would like to share with you that issues are addressed and resolved based on first come first serve basis. Currently, your issue is pending for analysis and is in the queue. I am afraid, we 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.

Thanks for your patience and understanding.

Hi Yves,

Thanks for your patience.

As a workaround, we would recommend you to use a Unicode-compliant font (for example, ‘Arial Unicode MS’) for symbols in your documents. Even if that font is not installed on machines where the document is viewed, browsers still will be able to perform font substitution and render the symbol.

Hope this helps you. Please let us know if you have any more queries.

Hello,
thank you for your feedback. Unfortunately this is not possible as the users will create the document and I won’t have full control of it.

So I need to wait until you guys find a solution as a “fix” in one of the next releases.
In this case, is this issue added so the developers will take care of this “some day”?

Bye
Yves

Hi Yves,

Thanks for your feedback.

I regret to share with you that the
implementation of the fix of this issue has been postponed. We will inform you as soon as
there are any further developments.

We apologize for your inconvenience.

Any news about this issue? Is there a referenced ticket so this topic informs me when it gets fixed?

@rausch,

Thanks for your inquiry. We regret to share with you that this issue is still postponed. We have asked for the ETA of this issue from our product team. As soon as any information is shared by them, we will be more than happy to share that with you.

We apologize for your inconvenience.