it's possible adjust a bigger colum to paper size when export whit pdfHtml5?

it's possible adjust a bigger colum to paper size when export whit pdfHtml5?

whernandezwhernandez Posts: 2Questions: 2Answers: 0

that's my code to create a table an export, but my problem its that i cant see all the columns when export to pdf, please help me.

$("#idTablaReporteECMMensajesError").dataTable({
"data": data,
tabla: "#idTablaReporteECMMensajesError",
dom: 'Blfrtip',
buttons:
[{
extend: 'collection',
text: DATBLG,
buttons: [
{
extend: 'excelHtml5',
title: RPRMM,
},
{
extend: 'pdfHtml5',
title: RPRMM,
exportOptions: {
columns: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,18,19,20]

                        },
                        customize: function (doc) {
                            // Splice the image in after the header, but before the table

                            console.log('doc.cont', doc.content);
                            //console.log('doc.cont', doc.content.table);
                            //console.log('doc.cont', doc.content.body);
                            var columns= []

                            for (var i = 0; i < doc.content[1].table.body[0].length; i++) {
                                columns.push("*");
                            }
                            doc.content[1].table.widths = columns;
                        },
                        orientation: 'landscape',
                        pageSize: 'TABLOID'
                    },
                    {
                        extend: 'csvHtml5',
                        title: RPRMM,
                    }]
            }],
"colVis": {
    "showAll": RPTXTALL,
    "showNone": RPTXTNOT,
    "buttonText": RPTXTMO
},
"order":[[2, "asc"]],
stateSave: true,
"lengthMenu": [500, 1000, 1500],
"scrollY": 250,
"scrollCollapse": true,
"scrollX": true,
"columns": that.columnsReporteECMMensajesMotor,
select: {
    style: 'os',
    selector: 'tr'
}

});

This discussion has been closed.