title: How to generate dynamic QR code using jquery and php,and save it as pdf?
body: <p>I want to generate a qr code in admit card and i want to download this admit card as PDF with some image.i have written code for this.everything is fine in web view but when i am going to download this ,QR code is not coming in PDF.
  I have used 1) <a href="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js" rel="nofollow noreferrer">https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js</a>
  2)"<a href="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js" rel="nofollow noreferrer">https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js</a>"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script&gt;
  
  
  $('#cmd').click(function() {
    var options = {};
    var pdf = new jsPDF('p', 'pt', 'a4');
    pdf.addHTML($("#content"), 15, 15, options, function() {
      pdf.save('pageContent.pdf');
    });
  });
  
  
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="content" style="background-color: #ffffff;"&gt;
     
              &lt;div class="page-content"&gt;
                 &lt;div class="container-fluid"&gt;
                  
                      &lt;table id="table-sm" class="table table-bordered  table-sm"&gt;
                      
                      &lt;tbody&gt;
                      &lt;tr &gt;
                          
                          &lt;td class="color-blue-grey-lighter" colspan="3"&gt;&lt;center&gt;&lt;img src="fb.png"&gt;&lt;/center&gt;&lt;/td&gt;
                          
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;img src="https://chart.googleapis.com/chart?chs=200x200&amp;cht=qr&amp;chl=&lt;?php echo $_GET['name'].$_GET['address']; ?&gt;" title="Link to Google.com"&gt;&lt;/td&gt;
  ///Here i am using google api qr code generator
                          &lt;td &gt;&lt;p style="font-size: 20px;margin-top: 29px;"&gt;Registration number :&lt;strong&gt;AISEWERT456&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;p style="font-size: 20px;margin-top: 29px;""&gt;Appliaction Status:&lt;strong&gt;Completed&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
                      
                      &lt;/tr&gt;
  
  
  
                      &lt;tr&gt;
                          
                          &lt;td style="width: 500px;" &gt;&lt;strong&gt;Center Number: &lt;/strong&gt;&lt;/td&gt;
                          &lt;td style="width: 600px;"&gt;&lt;strong&gt;Date of Exam : &lt;/strong&gt;&lt;/td&gt;
                          &lt;td rowspan="7"&gt;
                           
                           &lt;img src="std.png"&gt;&lt;br&gt;
                           &lt;img src="sign.png"&gt;
                              
  
                          &lt;/td&gt;
                          
                      &lt;/tr&gt;
                      
  
                      
  
                      
                      
  
                      &lt;/tbody&gt;
                  &lt;/table&gt;
  
  
  
                  &lt;/div&gt;
  
              &lt;/div&gt;
              
  &lt;/div&gt;
  
     
  
  &lt;button id="cmd" style="float: right;" type="button" class="btn btn-danger"&gt;Download&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>