Skip to content

table not showing properly #18

Description

@himadrinath

@Relorer @JeremyVm

table getting messed u

var html = "<table class=\"tiptap\" style=\"minWidth: 125px\"><colgroup><col><col><col><col><col></colgroup><tbody><tr><th colspan=\"1\" rowspan=\"2\"><p style=\"text-align: center\">ASCVD RISK&nbsp;</p><p style=\"text-align: center\">CATEGORY@</p></th><th colspan=\"2\" rowspan=\"1\"><p style=\"text-align: center\">CONSIDER THERAPY</p></th><th colspan=\"2\" rowspan=\"1\"><p style=\"text-align: center\">TREATMENT GOAL</p></th></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">LDL CHOLESTEROL</p><p style=\"text-align: center\">(LDL-C)(mg/dL)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">NON HDL CHLOESTEROL</p><p style=\"text-align: center\">(NON HDL-C) (mg/dL)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">LDL CHOLESTEROL</p><p style=\"text-align: center\">(LDL-C)(mg/dL)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">NON HDL CHLOESTEROL</p><p style=\"text-align: center\">(NON HDL-C) (mg/dL)</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">Extreme (A)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=50</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=80</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;50 (Indispensable)</p><p style=\"text-align: center\">&lt;30 (Optional)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;80</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">Extreme (B)</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=30</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=60</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;30</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;60</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">Very High</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=50</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=80</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;50</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;80</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">High</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=70</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=100</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;70</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;100</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">Moderate</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=100</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=130</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;100</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;130</p></td></tr><tr><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">Low</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=130*</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&gt;=160*</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;100</p></td><td colspan=\"1\" rowspan=\"1\" style=\"background-color: null\"><p style=\"text-align: center\">&lt;130</p></td></tr></tbody></table>";

var document = Document.Create(container =>
{
    container.Page(page =>
    {
        page.Content().Column(col =>
        {
            col.Item().HTML(handler =>
            {
                handler.SetTextStyleForHtmlElement("table", TextStyle.Default.FontSize(12));
                handler.SetHtml(html);
            });
        });
    });
});


document.ShowInPreviewer();

but it should be like this
table_problem

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions