Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table not showing properly #18

Open
himadrinath opened this issue Jun 20, 2024 · 1 comment
Open

table not showing properly #18

himadrinath opened this issue Jun 20, 2024 · 1 comment

Comments

@himadrinath
Copy link

@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

@himadrinath
Copy link
Author

still waiting ................🙄🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant