The image behind the print view doesnt display in datatable

The image behind the print view doesnt display in datatable

ismailbarsismailbars Posts: 4Questions: 3Answers: 0
edited January 2018 in Free community support

Hi,
My Code Snippet below there.I want to display a logo image behind the writings on print view of datatable.But I cant.Please help me how i can do that.(p.s. "images" folder is in my visual studio project.)

My Code Snippet

                 $(document).ready(function () {
                     var table = $('#RaporList').DataTable({
                       "aLengthMenu": [[4, 8, 12, -1], [4, 8, 12, "All"]],
                      "iDisplayLength": 4,
                      "bPaginate": false,
                      "bLengthChange": false,
                      "bFilter": true,
                      "bInfo": false,
                       "bAutoWidth": false,
                        "aaSorting": [[1, 'asc']],
                        dom: 'Bfrtip',
                       buttons: [
                        {
                        extend: 'excelHtml5',
                        exportOptions: {
                           columns: [1,2,3,4,5,6,7,8]
                       }
                      },
                     {
                       extend: 'print',
                       title: '',
                       messageTop: '<p style="font-size:24px">' + 'Haftalık Rapor Listesi',
                       customize: function (win) {
                           $(win.document.body)
                               .css('font-size', '14pt')
                               .prepend(
                               '<img src="images/Logo2.png" height=79 width=116 
                              style="position:absolute; top:0; left:0;" />'
                               );

                           $(win.document.body).find('table')
                               .addClass('compact')
                               .css('font-size', 'inherit');
                       },
                       exportOptions: {
                           columns: [1, 2, 3, 4, 5, 6, 7, 8]
                       }
                   },
               ],
               select: {
                   style: 'single'
               },
           });
       });
This discussion has been closed.