how to export all paginate from datatable with ajax ?

how to export all paginate from datatable with ajax ?

firchunfirchun Posts: 1Questions: 0Answers: 0
edited January 2023 in Free community support
var buttons = new $.fn.dataTable.Buttons(table, {
            buttons: [
                'copyHtml5',
                'excelHtml5',
                'csvHtml5',
                {
                    extend: 'pdfHtml5',
                    pageSize: 'LEGAL',
                    orientation: 'portrait ',
                    customize: function(doc) {
                        doc.content[1].margin = [10, 0, 10,
                            0
                        ] //left, top, right, bottom
                    },
                    exportOptions: {
                        modifier: {
                            order: 'current',
                            page: 'all'
                        }
                    }
                },
                'print',
            ]
        }).container().appendTo($('#buttons'));

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    I'm not clear what you're looking for. If it's to export data when serverSide is in use, then these threads here, here and here should help. If not, please can you provide more information,

    Colin

Sign In or Register to comment.