title: How to zip a pdf or ppt file using jszip?
body: <p>I want zip a pdf or some other format like excel, ppt etc using jszip.</p>
  
  <p>How to zip this format in jszip?</p>
  
  <p>My code is as below</p>
  
  <pre><code>&lt;BODY&gt;
    &lt;a id ='file' href="data/some.pdf" type="application/pdf; length=432628"&gt;Some.pdf&lt;/a&gt;
    &lt;input id="button" type="button" onclick="create_zip()" value="Create Zip"&gt;&lt;/input&gt;
  &lt;/BODY&gt;
  &lt;SCRIPT&gt;
          function create_zip() {
          var data = document.getElementById('file');
              var zip = new JSZip();
              zip.add(data, {base64: true});
              content = zip.generate();
              location.href = "data:application/zip;base64," + content;
          }
  &lt;/SCRIPT&gt;
  </code></pre>
  
  <p>What I want is that I will get the path of the file from the a element in the html. I want to zip the pdf using jszip</p>
  
  <p><a href="http://jsfiddle.net/Lm33E/" rel="nofollow">jsfiddle</a></p>