jspdf autotable linebreak无效

时间:2017-05-22 11:57:04

标签: javascript angularjs jspdf jspdf-autotable

$scope.exportToPdf=function(){

        $('#tableToExport').tableExport({type:'pdf',
            jspdf: {orientation: 'l',
                format: 'bestfit',
                margins: {left:10, right:10, top:20, bottom:20},
                autotable: {styles: {overflow: 'linebreak',
                    rowHeight: 60,columnWidth: 'wrap',textColor: 50},
                    columnStyles: {
                          4: {columnWidth: 'auto'}
                        },
                    tableWidth: 'auto',
                    fontSize: 5,
                }}
        })
    }

我希望生成表格,如以下链接所示:http://tinypic.com/r/jq0s5x/9

但是在我的pdf最后一栏中,当我使用columnWidth时,检查out-out是不完全可见的:'auto'代表第4列。这是因为我在synid和description列(4Th列)上使用了columnWidth:'wrap'(之前这个列的文本是部分可见的,由此修复)

这是我的pdf快照:http://tinypic.com/r/2ur1eoh/9

0 个答案:

没有答案
相关问题