dataTable how I can hide the title and date when pring?
dataTable how I can hide the title and date when pring?
saleemms
Posts: 5Questions: 3Answers: 0
Hi All,
I want to hide the website title
tag and date
when print.
Also, I want to add some text above the table. Like: 'Debtors Report'
How I can achieve this. Please help me!!!
I have tried below code for print the table:
$('#printData').DataTable({
dom: 'Bfrtip',
buttons: [
{
extend: 'print',
}
]
});`
Thanks in advance!!!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @saleemms ,
Here's the options for the print button,
Cheers,
Colin
Hi @colin ,
I have gone through this but I can't found to hide the website
title
anddate
.Thanks Saleem
Hi @saleemms ,
I think you're referring to the area at the top which isn't part of the generated page as such - that's added by the browser. Either remove it like this, or do it in the code with something like this.
Cheers,
Colin
@colin , Thanks for your answer.
I have solved this issue at my end using below code: