How to watermark image in pdf exported in datatable

How to watermark image in pdf exported in datatable

pratima7pratima7 Posts: 3Questions: 2Answers: 0

I am using datatables to display data in table format and have given export option , to export data into csv , pdf . Now i want to add a watermark image into pdf that gets downloaded from button in data table.
Here is code i tried but it didnt work for me,
var table = $('#holiday').DataTable( {
"dom": '<"nav" B>lfrtip',
"buttons": [
'excelHtml5',
'csvHtml5',
{
extend: 'pdfHtml5',
customize: function ( doc ) {
doc.content.splice( 1, 0, {
margin: [ 20, 20, 20, 20 ],
alignment: 'center',
image:'data:image/png;base64,abcdddd'
}] });
I also tried using watermark in place of image , but i didnt get result. Please help me regarding this. Thanks in advance

Answers

  • allanallan Posts: 62,241Questions: 1Answers: 10,211 Site admin

    Please follow the forum rules and do not post duplicates. Closing this discussion in favour of this thread.

    Allan

This discussion has been closed.