2

I am using pdfMake to create pdf document in my angular project. Meanwhile, I want to create the zip file containing my multiple pdf documents.

Are there any possible to do so? Your answers or ideas are appreciated.

chourn solidet
  • 280
  • 4
  • 18
  • See [Multiple download links to one zip file before download javascript](http://stackoverflow.com/questions/37176397/multiple-download-links-to-one-zip-file-before-download-javascript/) – guest271314 Dec 26 '16 at 02:22
  • My case is that I already created pdf document and converted to base64. After I download the zip, I get nothing inside. – chourn solidet Dec 26 '16 at 03:09
  • 1
    Did you trying using `zip.file()`, `zip.generateAsync({ type: "blob" })`? Is "base64" a valid `data URI`? Can you include `javascript` that you have tried at Question? See also [How to convert base64 to zip and move to server](http://stackoverflow.com/questions/38934833/how-to-convert-base64-to-zip-and-move-to-server/). – guest271314 Dec 26 '16 at 03:14
  • Thank for your idea. I go with JSZip. Now I add my base64 pdf to file. Before, I get nothing because my code tried to download zip before adding pdf (because I use setInterval to create multiple pdf docs). It works okay now :D I fixed that but I haven't tested on other browsers yet (chrome only). One more thing now, I am looking for ways to change my zip file name. – chourn solidet Dec 26 '16 at 04:57
  • You can set the name of the `.zip` file at `download` attribute of `` element; see first link. – guest271314 Dec 26 '16 at 08:36
  • 1
    @chournsolidet Can you put the code here? – Sabreena Dec 07 '17 at 10:40

0 Answers0