title: Is there a way to add pdfs to a jszip zip, using pdf-lib?
body: <p>Good morning. As the title says i'm trying to add pdfs files to a zip. I'm using pdf-lib and jszip.</p>
  <p>here's my switch case code where i'm implementing the logic:</p>
  <pre><code>case 'singolo':
          
  
          const zip = new JSZip();
  
          for(let i = 0; i &lt; pages.length; i++){
              const pdf = await PDFDocument.create();
              const [copiedPages] = await pdf.copyPages(pdfFile, [i])
              pdf.addPage(copiedPages);
              const singlePdf = await pdf.save(); //format uint8array
  
              console.log('singlePdf', singlePdf)
  
              zip.file(`pagina ${i + 1}`, singlePdf)
  
          }
  
          zip.generateAsync({type: &quot;blob&quot;}) //ritorna una promise quindi posso usare il then
              .then(function(content) {
                  saveAs(content, fileName ? fileName : `singoloPdf`); //metodo di fileSaver per poter scaricare lo zip
          });
          break;
      }
  </code></pre>
  <p>when i download the zip file, it contains not formatted files for being opened with adobe reader, but i've to specify with which program open them.</p>
  <p>Anyone can point me the way?</p>
  <p>Thanks in advance</p>