Search code examples
datatableszeroclipboard

How to configure ZeroClipboard for pdf generation?


I am using Datatable Tools to export some table to PDF but I am getting error while exporting the data. The error says

This instance of ZeroClipboard is not configured for PDF export. Please use the PDF export version.

Anyone knows how I can configure ZeroClipboard.js so I can get PDF?

Any help would be appreciated!


Solution

  • Based on your question, I assume you have it working and its displayed properly on the DataTable. I had the same problem recently and the fix was fairly easy, all I had to do was change the location of the swf file to the PDF one. Below is an example.

    "sDom": '<"clear">lfrtipT', "oTableTools": { "sSwfPath": "/js/DataTables-1.9.4/extras/TableTools-2.0.0/media/swf/copy_cvs_xls_pdf.swf" }

    Normally the default import is just "copy_cvs_xls.swf". The other file should be in the same location, check it out and import it instead.