title: How to delete grey border around canvas
body: <p>I need to export to pdf file some fragment of html.
  I use for that html2canvas and pdfjs. 
  But there is added some grey border around this fragment</p>
  
  <p>Here is test html fragment:</p>
  
  <pre><code>&lt;div class="col-md-12 white-bg box-shadow margb0" id="test"&gt;
       &lt;div class="col-md-12 paddl0 paddr0 margt0 margb10"&gt;
            &lt;h4 class="paddb10 margt20 margb10 border-bottom-sc"&gt;
                Some information out here
            &lt;/h4&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And css for it (col-md-12 is from bootstrap.min.css):</p>
  
  <pre><code>.white-bg { background: #ffffff; }
  .margb0 {margin-bottom: 0px !important;}
  .margt0 {margin-top: 0px !important;}
  .margb10 {margin-bottom: 10px;}
  .margt20 { margin-top: 20px;}
  .paddl0 {padding-left: 0px !important;}
  .paddr0 {padding-right: 0px !important;}
  .paddb10 { padding-bottom: 10px;}
  .border-bottom-sc {border-bottom: 1px solid #424343;}
  </code></pre>
  
  <p>In Chrome it looks like this:
  <a href="https://i.stack.imgur.com/vyXgM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vyXgM.png" alt="enter image description here"></a></p>
  
  <p>Here is how I do this in js:</p>
  
  <pre><code>var pdf = new jsPDF('p', 'pt', 'a4', true);
  var content = document.getElementById('test');
  html2canvas(content, { background: "white" },
                           { scrollX: 0, scrollY: 0 }).then(function (canvas) {
      var srcImg  = canvas;
      var sX      = 0;
      var sY      = 0;
      var sWidth  = 1150;
      var sHeight = 1350;
      var dX      = 25;
      var dY      = 25;
      var dWidth  = 1150;
      var dHeight = 1350;
      window.onePageCanvas = document.createElement("canvas");
      onePageCanvas.setAttribute('width', 1150);
      onePageCanvas.setAttribute('height', 1350);
      var ctx = onePageCanvas.getContext('2d');
      ctx.drawImage(srcImg, sX, sY, sWidth, sHeight, dX, dY, dWidth, dHeight);
      var canvasDataURL = onePageCanvas.toDataURL("image/png", 1.0);
  
      var width         = onePageCanvas.width;
      var height        = onePageCanvas.height;
      pdf.addImage(canvasDataURL, 'jpg', 0, 0, (width*.51), (height*.51));
      pdf.save('test.pdf');
  });
  </code></pre>
  
  <p>And here is how this fragment looks in document:
  <a href="https://i.stack.imgur.com/fj9NN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fj9NN.png" alt="enter image description here"></a></p>
  
  <p>Demo: <a href="https://jsfiddle.net/x6yg1kbm/2/" rel="nofollow noreferrer">https://jsfiddle.net/x6yg1kbm/2/</a></p>
  
  <p>So my question: how to not show this border during pdf export?</p>