2
The page has a datatables https://datatables.net/, would like to hide the items that is created by it at the time of printing, example: search field, paging etc.
My datatable is like this:
<script>
$(document).ready(function () {
$('#minhaTabela').DataTable({
"language": {
"lengthMenu": "Mostrando _MENU_ registros por página",
"zeroRecords": "Nada encontrado",
"info": "Mostrando página _PAGE_ de _PAGES_",
"infoEmpty": "Nenhum registro disponível",
"infoFiltered": "(filtrado de _MAX_ registros no total)",
"sEmptyTable": "Nenhum registro encontrado",
"sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
"sInfoFiltered": "(Filtrados de _MAX_ registros)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "_MENU_ resultados por página",
"sLoadingRecords": "Carregando...",
"sProcessing": "Processando...",
"sZeroRecords": "Nenhum registro encontrado",
"sSearch": "Pesquisar",
"oPaginate": {
"sNext": "Próximo",
"sPrevious": "Anterior",
"sFirst": "Primeiro",
"sLast": "Último"
},
"oAria": {
"sSortAscending": ": Ordenar colunas de forma ascendente",
"sSortDescending": ": Ordenar colunas de forma descendente"
}
}
});
});
</script>
To make the impression I am using the css print and put this way to hide more did not work.
.lengthMenu,
.zeroRecords,
.info,
.infoEmpty,
.infoFiltered,
.sEmptyTable,
.sInfo,
.sInfoEmpty,
.sInfoFiltered,
.sInfoPostFix,
.sInfoThousands,
.sLengthMenu,
.sLoadingRecords,
.sProcessing,
.sZeroRecords,
.sSearch,
.oPaginate,
.oAria {
display: none;
}
I would also like to hide the name of the window and the footer that the function takes from the browser.
Face in your css the class name has to have a point before, the class name starts with a
.
! guy.nome { css }
– hugocsl
@hugocsl So, I forgot this detail when publishing here rsrs, but unfortunately it is not yet that.
– mba