title: How to Set Size of Rendered Image
body: <p>I'm confused with how to designate the size of the image that html2canvas generates. <strong>For example, I'd like to be able to have my DIV remain 400px x 400px but have the rendered image be 1200px x 1200px.</strong> I've looked at <a href="https://html2canvas.hertzen.com/configuration" rel="noreferrer">the documentation</a> but I'm misunderstanding how to apply it. I've tried adding <code>a.width: 1200; a.height: 1200;</code> without luck.</p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>My save function, from my JS:</strong></p>
  
  <pre><code>$('#save').click(function() {
    html2canvas($('#imagesave'), {
      onrendered: function(canvas) {
        var a = document.createElement('a');
        a.href = canvas.toDataURL("image/png");
        a.download = 'myfile.png';
        a.click();
      }
    });
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="imagesave"&gt;
  ...
  &lt;/div&gt;
  
  &lt;button id="save"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>#imagesave {
    background-color: white;
    height: 400px;
    width: 400px;
  }
  </code></pre>