I have problem with printing output in opened window via javascript. I create new document via `window.open` with included CDN links to bootstrap files. In opened window everything looks ok but if i use print (XPS document writer) some styles are here (`.btn-group`) but layout or inline styles are not.

Q: How i can print what i see in new window?

In link on CDN i have `media='all'` (but tried `media='print'` too).

Working example:
[jsfiddle](https://jsfiddle.net/o2gxgz9r/5855/)

```
$('#openNewWindow').click(function(e){
    var printWindow = window.open('', '_blank', 'width=1100, height=500');

    printWindow.document.open();
    printWindow.document.write("<!doctype html><head><title>title</title>");

    var cdn = `
  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" media="all" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <!-- Optional theme -->
  <link rel="stylesheet" media="all" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">        
    `;

    printWindow.document.write(cdn);        
    printWindow.document.write("</head><body>");

    content = `
        <div class="container-fluid">
            <div class="row">
              <div class="col-md-8" style="background-color: red">.col-md-8</div>
              <div class="col-md-4" style="background-color: blue">.col-md-4</div>
            </div>            
        </div>

    <div class="btn-group" role="group" aria-label="...">
      <button type="button" class="btn btn-default">Left</button>
      <button type="button" class="btn btn-default">Middle</button>
      <button type="button" class="btn btn-default">Right</button>
    </div>
    `;

    printWindow.document.write(content);        
    printWindow.document.write('</body></html>');

    printWindow.document.close(); // necessary for IE >= 10
    printWindow.focus(); // necessary for IE >= 10*/

    setTimeout(function () {
        printWindow.print();
    },1000)

});

```