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

Free Support Forum - aspose.com

Bug in evaluation version

I have started to evaluate aspose.words and found bug, when I converted file from MS WORD to HTML using

Document doc = new Document("C:\\1.DOC");
doc.Save("C:\\htm.htm");

The bug is:

there are some additional strings with digits in resulting HTML.

For example: Source Doc contains

There is an example doc to convert

Resulting HTML contains:

1

2

There is an example doc to convert

Will we have this bug if we will buy the commercial version?

Sincerely yuors,

Denis Kupriyanov,

Interfax, Ltd, Moscow, e-mail: xden@interfax.ru, den7k@mail.ru


This message was posted using Aspose.Live 2 Forum

Hi Denis,

Could you attach your input DOC file and output HTML file? I will try to reproduce the issue on my side and let you know the results.

Thanks,

Hi Denis,

files are in attachment.

The code to convert is:

try
{
    License Lic = new License();
    Lic.SetLicense("aspose.words.lic");
    Document doc = new Document("C:\\1.DOC");
    doc.Save("C:\\htm.htm");
}
catch (UnsupportedFileFormatException e)
{
}

Hi Denis,

Thank you for additional information. There is Primary header in your document. As you may know HTML format is one page format and it does not support Headers/Footers natively. Currently Primary Header/Footer are exported to HTML. It is the reason why additional characters appear in the output HTML. You can use the following code to clear Headers:

// Open document.
Document doc = new Document("1.doc");
doc.Sections[0].HeadersFooters.Clear();
doc.Save("out.htm");

Best regards,

Thank You, Andrey! It works.