Image export buttons (clipboard, pdf, excel)

Image export buttons (clipboard, pdf, excel)

pazpaz Posts: 5Questions: 2Answers: 0

Hello everyone

First I want to thank for DataTables. It's awesome.

My question has already been asked before, but long time ago. So my question is:

Is there any solution to export a datatable that includes images?

It doesn't matter if it's clipboard, excel or pdf. Are there any good examples of customisations?

Thanks

Answers

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

    Hi @paz ,

    This thread here will help, it discusses the same thing,

    Cheers,

    Colin

  • pazpaz Posts: 5Questions: 2Answers: 0

    Ok. got it.
    So it's easily possible to get the images visible within print view by using
    stripHtml: false

    But it's not easy in pdfs and almost impossible in xlsx. Right?

    Another question. If i use
    var table = $('#data-table1').DataTable(); var data = table.buttons.exportData( { columns: ':visible' } );

    I have the whole content of the visible datatable within data. Would it be possible to use data to create a pdf from it by using pdfmake?

  • pazpaz Posts: 5Questions: 2Answers: 0
    edited June 2018

    Is it possible to send a message to print view, that will not be printed?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited March 2021

    Hi @paz ,

    Yep, you can disable autoPrint, see the example here.

    On your other questions, it should be possible for the other formats, in that thread they report it can be, but not so straight forward and no-one had tried it! And the PDF export does use pdfmake already.

    Hope that helps,

    Cheers,

    Colin

This discussion has been closed.