HTML to PDF - ordered list being rendered as an unordered list

HTML:


H3 Text


Some warning text

Title Text

  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6
  • Item 7
  • Item 8
  • Item 9
  • Item 10
  • Item 11


  • C# Code:
    Pdf pdf1 = new Pdf();
    Section sec2 = new Section(pdf1);
    pdf1.Sections.Add(sec2);
    string str = “<meta name=“generator” content=“testcontent”>

    H3 Text


    <span style=“color: #ff0000;”>Some warning text

    Title Text

    1. Item 1
    2. Item 2
    3. Item 3
    4. Item 4
    5. Item 5
    6. Item 6
    7. Item 7
    8. Item 8
    9. Item 9
    10. Item 10
    11. Item 11
    ”;
    Text tex = new Text( str );
    tex.IsHtmlTagSupported = true;
    sec2.Paragraphs.Add(tex);

    Hello Philip,


    I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-33879. We will investigate this issue in details and will keep you updated on the status of a correction.

    We apologize for your inconvenience.

    The issues you have found earlier (filed as PDFNEWNET-33879) have been fixed in Aspose.Pdf for .NET 9.3.0.

    Blog post for this release can be viewed over this link


    This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

    Hi Philip,


    Thanks for your patience. In reference to above fix, Please use new DOM approach for HTML to PDF conversion, it will help you to accomplish the task.

    HtmlLoadOptions options = new HtmlLoadOptions();<o:p></o:p>

    options.UseNewConversionEngine = true;<o:p></o:p>

    Document pdfDocument = new Document(inFile, options);<o:p></o:p>

    pdfDocument.Save(outFile);


    Please feel free to contact us for any further assistance.


    Best Regards,