2
Use the following bootstrap classes
hidden-print
: not to show in print - will be displayed in HTMLvisible-print
: to display in print - will not be displayed in HTML
Example:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="hidden-print">
<p>Não mostra na impressão mas mostra no HTML</p>
<a href="javascript:window.print()">Imprmir</a>
</div>
<div class="visible-print">
<p>Mostra na impressão mas não mostra no HTML</p>
</div>
<div>
<p>Mostra em ambos</p>
</div>
You still have the option to create styles that will only be used in printing, I can remember two ways
1 - Creating a style sheet for printing and importing into your HTML with tag media="print"
<link href="style.css" media="print" rel="stylesheet" />`
2 - Or using the meta tag @media print { }
in your style sheet
@media print {
/* Your styles here */
}
I finished Hidden-print but then the whole page is blank, without the texts;inside those tables, I have texts that need to be displayed.
– Chefe Druida
The class
hidden-print
will hide all child elements of the component you assigned to the class.– Pedro Camara Junior
Okay, thanks, I used @media print {.
– Chefe Druida