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

Free Support Forum - aspose.com

Aspose word DocumentBuilder.InsertHtml() issue

Hi Team,


I am using Aspose Words .NET to embed HTML content in text document.

I am getting issue while inserting list types HTML content in Word document.

Bullet ed list with empty Circle and Square type and roman number is not inserted in document.

See below sample code:-

string htmltext1 = “
  • Circle 1

 

 

  • Square1
”;

string htmltext2 = “
  1. Bullet1

 

  1. Bullets2

 

  1. Bullet3
”;

// This is instance
DocumentBuilder.InsertHtml(htmltext1);
DocumentBuilder.InsertHtml(htmltext2);

Result is as below:

  • Circle 1

  • Square1

  1. Bullet1

  1. Bullets2

  1. Bullet3
Please help in solving this issue.

Regards,
Nakul



Hello

Thanks for your inquiry. Unfortunately, list-style-type is not yet supported during HTML import. Your request has been linked to the appropriate issue. You will be notified as soon as this feature is supported.

But you can still achieve what you need using Type Attribute of

      :

    Document doc = new Document();

    DocumentBuilder builder = new DocumentBuilder(doc);

    string htmltext1 = @"

    <ul type='circle'>

  • Circle 1
  • <ul type='square'>

  • Square1
  • <ol type='1'>

  • Bullet1
  • <ol type='a'>

  • Bullets2
  • <ol type='i'>

  • Bullet3
  • ";

    // This is instance

    builder.InsertHtml(htmltext1);

    doc.Save("C:\\Temp\\out.doc", SaveFormat.Doc);

    Please see the following link to learn more about Optional Attributes: http://www.w3schools.com/tags/tag_ol.asp

    Best regards,

    Thanks for quick reply Andrey,


    I will implement like this.

    Regards,
    Nakul

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


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