Jason's answer to Print the contents of the DIV , and the plugin he created worked fine for me.
Below is the css value that I added in the Print.css file I am referring to:
@media print { .Printable { display: block; background-color: white; position: fixed; top: 0; left: 0; margin: 0; padding: 15px; font-size: 14px; line-height: 18px; } .Printable .Content { height: auto; overflow: auto; width: 700px; margin: 0; padding: 15px; }} $("#Container .Printable").printThis({ debug: false, importCSS: true, printContainer: false, loadCSS: "../Print.css",`` pageTitle: "TITLE", removeInline: false }); <link href="../Print.css" rel="stylesheet" type="text/css" /> <script src="../Scripts/printThis.js"></script>
source share