title: Phantom JS for Node, use print stylesheet?
body: <p>I'm using Node JS to generate PDFs.</p>
  
  <p>Is there a way to get Phantom JS to screenshot pages using the print stylesheet instead of the screen one?</p>
  
  <p>At the moment I have the print stylesheet all set up and good to go, but Phantom JS is being recognised as a screen device instead of print.</p>
  
  <p>Here's a snipped of code so you can see what I'm doing.</p>
  
  <p>Thanks in advance! </p>
  
  <pre><code>    var date = Date.now();
      var images = [];
  
      capture(results.length, 0);
  
      function capture(pagesLength, pageId) {
          if (pagesLength &lt;= 0) {
              stopCapture();
          }
          else {
              snapshot(pagesLength, pageId);
          }
      }
  
      function snapshot(pagesLength, pageId) {
          phantom.create(function (ph) {
              ph.createPage(function (page) {
                  page.open("http://127.0.0.1:3000/#/pages/" + results[pageId]["_id"], function (status) {
                      var fileName = results[pageId]["_id"] + ".jpeg";
                      images.push(fileName);
                      page.render("public/temp/" + date + "/" + fileName, {format: 'jpeg', quality: '100'}, function () {
                          pagesLength--;
                          pageId++;
                          ph.exit();
                          if (pagesLength &lt;= 0) {
                              mergeImages();
                          } else {
                              snapshot(pagesLength, pageId);
                          }
                      });
                  });
              });
          });
      }
  </code></pre>