title: How can I make PDF from div HTML using html2pdf in javascript, but the same for mobile and pc views
body: <p>I need export a div tag as PDF, and I am using html2pdf, but when I export from mobile devices the view is different that when export pc (in mobile devices is smaller).</p>
  
  <p>My Code HTML y JS:</p>
  
  <pre><code>      &lt;div id="contentToExport" &gt;
          &lt;div class="row"&gt;
              &lt;div class="col-lg-8 col-xs-12 mt-10" &gt;
                            &lt;canvas id="chartPie" width="1300" height="600"&gt;&lt;/canvas&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-lg-6 col-lg-offset col-xs-offset-1 mt-10" style="border: none"&gt;
              &lt;div class="panel panel-default card-view"&gt;
                  &lt;div class="panel-heading"&gt;
                  &lt;div class="pull-left"&gt;
                    &lt;h6 class="panel-title txt-dark"&gt;Elements list&lt;/h6&gt;
                  &lt;/div&gt;
                  &lt;div class="clearfix"&gt;&lt;/div&gt;
                &lt;/div&gt;
                  &lt;div class="panel-wrapper collapse in"&gt;
                    &lt;div class="panel-body row"&gt;
                      &lt;div class=""&gt;
                          ...List elements   
                        &lt;hr class="light-grey-hr mt-0 mb-15"/&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>Mi JS code:</p>
  
  <pre><code>  var element = document.getElementById('contentToExport');
    var opt={
      margin:     [2,1],
    filename:     'Report.pdf',
    image:        { type: 'png', quality: 1.0 },
    html2canvas:  { scale: 2 },
    jsPDF:        { unit: 'in', format: 'letter', orientation: 'portrait' }
     }
    html2pdf(element).set(opt).save();
  </code></pre>