Free Support Forum - aspose.com

Html to word- list

Hi,

When I convert html Ordered-list to Word, it seems to be working fine. But if I press Enter after List 1, then the List 10 text gets far from number.
The code I have used is
//-----------
string dataDir = @“D:”;

// Initialize a Document.
Document doc = new Document();
string stringValue = @"
<ol start="“1"”>
  • 1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • ";

    // Use a document builder to add content to the document.
    DocumentBuilder builder = new DocumentBuilder(doc);
    builder.InsertHtml(stringValue);
    dataDir = dataDir + “CreateDocument_out_.docx”;
    // Save the document to disk.
    doc.Save(dataDir);
    // -------------

    Please check the attachment.

    Could you please let me know what can be done to solve this problem.

    Thanking you,
    Lakpa Sherpa
    Hi Lakpa,

    Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 16.4.0 and have not found the shared issue. Please use Aspose.Words for .NET 16.4.0. We have attached the output document with this post for your kind reference.

    Hi Tahir,

    Thank you for reply.
    The problem doesn’t occur while creating doc file but if I open the DOC file created from Aspose.word in Microsoft Word and then press Enter in any number (1-10) the above scenario occurs.

    In addition I get some other problem too
    1. If I select any number (1-9) and press (SHIFT + TAB) then the list isn’t aligned properly
    2. If I delete (10.) and add it again then it doesn’t get aligned properly with (11.)+ list.

    Thanking you,
    Lakpa

    Hi Lakpa,


    Thanks for sharing the detail.
    Lakpa Sherpa:
    The problem doesn’t occur while creating doc file but if I open the DOC file created from Aspose.word in Microsoft Word and then press Enter in any number (1-10) the above scenario occurs.
    We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13602. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
    Lakpa Sherpa:
    1. If I select any number (1-9) and press (SHIFT + TAB) then the list isn’t aligned properly
    2. If I delete (10.) and add it again then it doesn’t get aligned properly with (11.)+ list.
    Could you please share the screenshots of these issues here for our reference?

    For second issue, please share steps here to reproduce this issue at our end. We will investigate the issues and provide you more information.

    Hi Tahir,

    I have attached a screenshot of how to reproduce the error. This issue tested in Microsoft Word 2010 and 2016

    Thanking you,
    Lakpa
    Hi Lakpa,

    Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13613. You will be notified via this forum thread once this issue is resolved.

    We apologize for your inconvenience.

    Hi Tahir,

    When
      is used then the format isn’t correct.

    string stringValue = @"
    1. a
    2. a
    3. a
    4. a
    5. a
    6. a
    7. a
    8. a
    9. a
    10. a
    11. a
    12. a
    13. ";

      This happens on converted word file without edit.

      Thanking you,
      Lakpa Sherpa

      Hi Lakpa,

      Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13663. You will be notified via this forum thread once this issue is resolved.

      We apologize for your inconvenience.

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


      This message was posted using Notification2Forum from Downloads module by aspose.notifier.
      Hi Lakpa,

      Thanks for your patience. Please use latest version of Aspose.Words for .NET 16.6.0 and use DocumentBuilder.InsertHtml with UseBuilderFormatting=true as a workaround of issue (WORDSNET-13613). Hope this helps you.

      Document doc = new Document();

      string stringValue = @"

    14. 1
    15. 1
    16. 2
    17. 3
    18. 4
    19. 5
    20. 6
    21. 7
    22. 8
    23. 9
    24. 10
    25. 11
    26. 12
    27. 13
    28. 14
    29. 15
    30. 16
    31. 17
    32. 18
    33. ";

      DocumentBuilder builder = new DocumentBuilder(doc);

      builder.InsertHtml(stringValue, true);

      doc.Save(MyDir + "Out.doc");

      doc.Save(MyDir + "Out.docx");



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


      This message was posted using Notification2Forum from Downloads module by aspose.notifier.
      Hi Tahir,
      I wondering if WORDSNET-13602 (Unresolved); is going to be fixed. I have asked this question almost a year ago (5-24-2016) when I first purchased the license and till now I haven't had any update about it, whether or not its going to be resolved and my subscription is about to expire too.

      Could you please let me know any update about it.

      Thank you,
      Lakpa Sherpa
      Hi Lakpa,

      Thanks for your inquiry. We regret to share with you that your issue has been postponed. I am afraid, there is no estimate available at the moment. However, 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.

      Hi,
      Any progress on issue WORDSNET-13602

      Thank you,
      Lakpa Sherpa

      @Lakpa_Sherpa,

      Unfortunately, WORDSNET-13602 is not resolved yet and there is no further news about this issue. The implementation of the fix of this issue has been postponed till a later date. There are no estimates available at the moment. We will inform you via this thread as soon as this issue is resolved or any estimates are available. We apologize for your inconvenience.