title: why cordova dont save jspdf?
body: <p>the code works only by starting it from the browser, while in the phone the button does not generate pdf ...
  I state that I've been using Cordova recently and maybe I can't set the plugins well .. any information, even trivial, can be useful.
  the cart table is generated by a javascript code that uses the dom on another hatml page, I think that something is almost certainly missing to make the app store the file on the device but I don't know what to insert .. also which plug in to refer to possibly ..
  Thanks in advance to everyone</p>
  <pre><code>&lt;strike&gt;
   &lt;HTML&gt;
      &lt;HEAD&gt;
         &lt;LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; href=&quot;style.css&quot;&gt; 
                 
       
         &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js&quot;&gt;&lt;/script&gt;
        &lt;script src=&quot;js/carrello.js&quot;&gt;&lt;/script&gt;
         
      &lt;/HEAD&gt;
      
      &lt;BODY&gt;
          &lt;div&gt;
            &lt;h2&gt;Il tuo Ordine&lt;/h2&gt;
                   
           &lt;script language=javascript &gt;
    
              carrello = eval(localStorage.carrello);
              document.write(&quot;&lt;div id=elenco&gt;&quot;);
              tabella(); 
              document.write(&quot;&lt;/div&gt;&quot;);
              totali();
              
           &lt;/script&gt;
         &lt;/div&gt;
      &lt;br&gt;
      &lt;br&gt;
         &lt;a class=&quot;pTab&quot; href=prodotti.html style=&quot;text-decoration: none;&quot;&gt;Torna ad ordinare&lt;/a&gt;
         &lt;br&gt;
         &lt;br&gt; 
         &lt;a class=&quot;pTab&quot; href=javascript:svuota() style=&quot;text-decoration: none;&quot;&gt;Svuota ordine&lt;/a&gt;
       &lt;br&gt;
       &lt;br&gt;
       &lt;br&gt;
          &lt;button onclick=&quot;scaricaPdf()&quot;&gt;crea PDF&lt;/button&gt;
      &lt;br&gt;
      &lt;br&gt;
     
        &lt;a href=&quot;index.html&quot; style=&quot;text-decoration: none;&quot;&gt;
          &lt;div class=&quot;mybutton1&quot;&gt;HOME&lt;/div&gt;
      &lt;/a&gt;
      &lt;/BODY&gt;
        &lt;script&gt; 
         
  function scaricaPdf() {
         var doc = new jsPDF();
  
         var spesaTotale= document.getElementById(&quot;totale&quot;).innerHTML;
         var x=20; //variabile per i margini
         var y=35; //variabile per le righe
         doc.setFontSize(15);
         doc.text(20,20,'Questo è il tuo ordine:');
         doc.setFontSize(10);
         doc.text(20,30,'Codice'+'  Descrizione Prodotto' +'  Prezzo'+'  Quantità'+'   Totale'); 
         for(var i=0; i&lt;carrello.length; i++){
              y=y+5;
              var codiceProdotto=carrello[i].codice;
              doc.text(x,y,' '+codiceProdotto);
              var descrizioneProdotto = carrello[i].descr;
              doc.text(33,y,''+descrizioneProdotto);
              var prezzoProdotto = carrello[i].prezzo;
              doc.text(68,y,''+prezzoProdotto);
              var quantitaProdotto =carrello[i].qnt;
              doc.text(83,y,''+quantitaProdotto);
              var totProdEuro=carrello[i].prezzo * carrello[i].qnt;
              doc.text(100,y,''+totProdEuro);
           }
         
         
         doc.text(20,200, 'Totale        '+spesaTotale);
         doc.save('Ordine.pdf');
  }
  
         &lt;/script&gt;
        
        &lt;script src=&quot;cordova.js&quot;&gt;&lt;/script&gt;
        &lt;script src=&quot;js/index.js&quot;&gt;&lt;/script&gt;
      &lt;/HTML&gt;
      
  
  &lt;/strike&gt;
  </code></pre>