simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.33k stars 624 forks source link

line breaks are not working #1040

Closed loganscodes closed 2 months ago

loganscodes commented 8 months ago

When I justify the text, line breaks are not working. Here is my code.


doc.autoTable({
                theme:['grid'],
                startY:280,
                styles: {
                    fontSize:10,
                    textColor:80,
                    cellPadding:1,
                    /*rowHeight:700
                    /*font: 'arial'*/
                    halign: 'justify'
                },
                margin: margen,
                bodyStyles: {
                    valign: 'middle', //(doc.internal.getNumberOfPages()!=1) ? 'middle' : 'top',
                    cellPadding: 10,
                    lineColor:'#fff',
                    //rowHeight: (doc.internal.getNumberOfPages()==1) ? 700 : 'auto' ,
                },
                tableWidth: anchoTable,
                tableLineColor:'#fff',
                body: [[contenido]]
            })
simonbengtsson commented 2 months ago

Likely duplicate of https://github.com/simonbengtsson/jsPDF-AutoTable/issues/974