But, the following C# code of Aspose.Words for .NET, when running with 20.4 and 21.8 versions, produces exactly the same outputs on our end:
Document doc = new Document(@"C:\temp\input.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml("<bold>this is bold HTML</bold>"); // in both cases it gives an output which is not bold
doc.Save("C:\\temp\\awnet-20.4.docx");
Can you please provide your source HTML, Aspose.Words generated DOCX files and piece of source code here for testing?
But, we are observing a couple of compile time errors on the following method:
private static RichTextField Convert(string value)
{
//value = WorkAround(value);
var htmlStringAsBytes = ConvertHtmlStringToBytes(value);
return new RichTextField(GetText(htmlStringAsBytes), htmlStringAsBytes);
}
The type or namespace name ‘RichTextField’ could not be found (are you missing a using directive or an assembly reference?)
Can you please create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end and attach it here for our testing? Please do not include Aspose.Words DLL files in it to reduce the file size. Thanks for your cooperation.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsposeWordsPartialHtmlBug
{
public class RichTextField
{
public RichTextField(string text, byte[] document)
{
Text = text;
Document = document;
}
public string Text { get; set; }
public byte[] Document { get; set; }
}
}
For the sake of any corrections in latest versions of Aspose.Words API, we have logged this problem in our issue tracking system with ID WORDSNET-22633. We will further look into the details of this problem and will keep you updated on the status of linked issue. We apologize for any inconvenience.