You can use CSS to choose which elements to print when you run the event on the button.
<style media="print">
#sidebar, .header, .site-footer, .invoice-btn, #titulo {
display: none;
}
#contenido_DIV {
display:block;
}
</style>
<a onclick="javascript:javascript:window.print();" >Print</a>
The only drawback I see is that you have to define the selectors well so that only what you want to see is visible in the print window.
You can also do it using javascript, which I think is best for you. You call the function with the name of the DIV that you want to print, then you open the print window in a new tab with the content of the div and when closing the dialog the tab will close automatically.
<div id="ID_DIV">
</div>
<a onclick="javascript:window.imprimirDIV('ID_DIV');">Print </a>
<script>
function imprimirDIV(contenido) {
var ficha = document.getElementById(contenido);
var ventanaImpresion = window.open(' ', 'popUp');
ventanaImpresion.document.write(ficha.innerHTML);
ventanaImpresion.document.close();
ventanaImpresion.print();
ventanaImpresion.close();
}
</script>