выровнять строку таблицыExport с помощью pdfmake - PullRequest
0 голосов
/ 11 декабря 2018

Как center выровнять конкретную строку colspan.я использую tableExport с pdfmake.

вот мой код в jquery

$('#example').tableExport({
    fileName: "example",
    type: 'pdf',
    pdfmake:
        {
            enabled: true,
            docDefinition: {
                pageOrientation: 'landscape', 
                defaultStyle: {
                    font: 'Roboto',     
                    fontSize: 8,
                    bold: true,
                    //alignment: 'left',
                }, content: [{
                    table: {
                        headerRows: 2,
                        widths: [125, "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*"],
                        alignment: 'center',
                        columns: [
                        {
                            alignment: 'center', // Optional, for body texts
                        }
                        ]
                    }
                }]
            }
        },
});

Это не работает.Вот собственно и есть.я отмечаю значение, которому нужно только выравнивание по центру enter image description here

...