numbers of columns in html-embedded-in-docx



  • Hi,
    I have written HTML code in the main template which I need to run for both HTML to XLSX and HTML-embedded-in-DOCX. The HTML table tag contains 10 columns. It works properly for HTML to XLSX and gives me the correct XLSX file.
    But the DOCX file is not coming properly — the widths of all columns become very small.
    Is there any way to make it display properly in DOCX?
    Can we set the DOCX template to landscape size, or is there any other solution?
    here is jsreport playground link:
    https://playground.jsreport.net/w/anon/WTaKx8MG



  • It works the way jsreport takes your html as is and puts it into the docx file source.
    When you open the Word app, it interprets the HTML.
    jsreport does not influence how it is interpreted.

    Perhaps you can try the docx recipe and docxHtml helper, if you need to display just a simple html.
    This would let you modify the page size and orientation in the word template.
    https://jsreport.net/learn/docx#docxhtml


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.