Major issue (bug) with numeric bullets when converting to html!

Hi Omri,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. We have asked the ETA of this issue from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,

Hi,
Any news regarding this issue?
Do you have a bug number?

Omri

Hi Omri,

Thanks for your inquiry. The ID of this issue is WORDSNET-12982. We have verified the status of this issue from our issue tracking system and regret to share that this issue is still unresolved. Currently, it is in development phase. We will inform you via this thread as soon as it is resolved. Sorry for any inconvenience.

Best regards,

Hi Omri,

Thanks for being patient. While you’re waiting for a fix, we can offer you another workaround to fix this issue. You can import any desired node to a new empty document and then use Save() method to save the whole document. You should get expected result in this case. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

Hi,
Thank you for your replay.
Unfortunately this workaround is not good for us since we can’t save more then one document.
Please handle it as quickly as possible since this is a major issue for us.
Thanks!

Hi Omri,

We have passed your concern to our product team and will inform you as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

Hi,
Any news about this?

Omri

Hi Omri,

We have verified the status of this issue from our issue tracking system and regret to share that this issue is still unresolved. Currently, it is in development phase. We will inform you via this thread as soon as it is resolved. Sorry for any inconvenience.

Best regards,

Hi Omri,

It is to update you that we have just released a new version of Aspose.Words for .NET. We can see now your problem can be solved. Yes, Node.ToString(…) doesn’t write style section to an output string, but it is now possible to do this easily using ICssSavingCallback interface as follows:

const string homeFolder = @"input.doc";
var so = new HtmlSaveOptions();
var cssCallback = new CssSavingCallback();
so.CssSavingCallback = cssCallback;
so.CssStyleSheetType = CssStyleSheetType.External;
var doc = new Document(homeFolder + "1.doc");
var node = doc; //var node = GetNode(doc);
var html = node.ToString(so);
var css = "\r\n\r\n" + cssCallback.GetCss() + "\r\n\r\n";
const string htmlTag = "";
var index = html.IndexOf(htmlTag, StringComparison.InvariantCulture);
if (index != -1)
index += htmlTag.Length;
else
index = 0;
html = html.Insert(index, css);
File.WriteAllText(homeFolder + "newout.html", html);
internal class CssSavingCallback : ICssSavingCallback
{
    public void CssSaving(CssSavingArgs args)
    {
        mCssStream = new MemoryStream();
        args.CssStream = mCssStream;
        args.IsExportNeeded = false;
        args.KeepCssStreamOpen = true;
    }
    internal string GetCss()
    {
        mCssStream.Seek(0, SeekOrigin.Begin);
        var css = Encoding.UTF8.GetString(mCssStream.ToArray());
        return css;
    }
    private MemoryStream mCssStream;
}

Hope, this helps.

Best regards,

Hi,

First of all, thank you for the support in this case, this is a major issue for us.

Unfortunately, we can’t use CSS, since this html is embeds inside a larger HTML. So it needs to be “pure” html.
CSS can be “translated” to style attribute on the main div of the node. Can you support this kind of solution? and if not, what can we do?

Thanks

Hi Omri,

Thanks for your inquiry. We have passed your concern to our product team and will keep you informed of any further developments.

Best regards,

Hi,
It’s been over a month. Any news?

Hi Omri,

Thanks for your inquiry.

Unfortunately, your issue is not resolved yet and there are no estimates available. Because of complexity, the implementation of the fix of this issue has been postponed till a later date. We will inform you as soon as this issue is resolved. We apologize for your inconvenience.

Best regards,

Any news about this issue?

Hi Omri,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. We have asked the ETA of this issue from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,

Do you have an ETA for this ETA? :slight_smile:

Hi Omri,

I am in coordination with product team to get answer pertaining to your queries. Soon you will be updated with the required information.

Best regards,

Hi Omri,

We have found that the output looks as expected with ExportListLabels = ExportListLabels.AsInlineText mod as follows:

File.WriteAllText(@"E:\WordTest\1.htm", new Aspose.Words.Document(@"E:\WordTest\1.doc").ToString(
             new Aspose.Words.Saving.HtmlSaveOptions
             {
                 ExportImagesAsBase64 = true,
                 ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.None,
                 ExportListLabels = ExportListLabels.AsInlineText
             }));

Please let us know if this solution is acceptable for you?

Best regards,

Thank you!
I can confirm that this solution is working.

Hi Omri,

Regarding WORDSNET-12982, our product team has completed the work on your issue and has come to a conclusion that this issue is actually not a bug. So, we have closed this issue as ‘Not a Bug’. Please use the code from the previous post to fix this issue.

Best regards,