title: window.print() set a table fit in page
body: <p>This is how it looks my HTML:</p>
  
  <p><a href="https://i.stack.imgur.com/hDAiF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hDAiF.jpg" alt="Html"></a></p>
  
  <p>In order to print the page I am using in JavaScript the <code>window.print()</code> function. </p>
  
  <pre><code>$scope.print= function() {
      $("#tab2-panel-tools").hide();
      $("#title-row").hide();
      window.print();
      $("#tab2-panel-tools").show();
      $("#title-row").show();
  }
  </code></pre>
  
  <p>In the next image is my print preview. In the print preview the table exceed the width of the page. How can I fit the table in the page?
  <a href="https://i.stack.imgur.com/rnnbr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rnnbr.jpg" alt="print preview"></a></p>