In the below code there are two div tags and we need to print the content only in one div tag where the both the div tags are on the same page.
The content in the printable div tag is hidden in this example and you can modify the style property as per your requirement. Below Jquery code will enable the printing of the div content. Download the PrintElement Jquery library from here.