Datatables FlashPDF / Html5PDF

Datatables FlashPDF / Html5PDF

jspringejspringe Posts: 2Questions: 1Answers: 0

Currently I'm only testing the FlashPDF functionality due to the fact I also have to support as low as IE9, but when I try to set the filename or extension options they seem to be ignored. I'm using the version that was available on the CDN as of today (Feb 25, 2016).

$(function() {
    $("#report-table").DataTable({
        dom: 'Blfrtip',

        buttons: [
            {
                extend: 'pdfFlash',
                text: 'Save current page',
                filename: 'test',
                extension: 'pdf',
                orientation: 'landscape'
            }
        ],
        pageLength: 100,
        "order": [[1, "asc"]],
        "language": {
            "emptyTable": "No new matches to report at this time."
        }
    });
});

The only thing that changes the filename is the title option which, of course, changes the title within the document. Otherwise the extension exports mostly as expected.

Any suggestions?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,089Questions: 1Answers: 10,388 Site admin
    Answer ✓

    That's a bug in Buttons 1.1.2 I'm afraid I've just committed a fix and it will be in the nightly shortly.

    Thanks for letting me know about it.

    Regards,
    Allan

  • jspringejspringe Posts: 2Questions: 1Answers: 0

    Thanks. Looks like this fixed it. On an unrelated note / thought - this update just made a good case for me including bower in my project. ;)

This discussion has been closed.