Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable JSZip compression #713

Closed
pimlottc-gov opened this issue Apr 19, 2020 · 2 comments
Closed

Enable JSZip compression #713

pimlottc-gov opened this issue Apr 19, 2020 · 2 comments
Assignees
Milestone

Comments

@pimlottc-gov
Copy link

We are using pptxgenjs to generate a fairly large deck (250+ slides) and our file size is starting to reach the limits of the mail server. I was surprised to notice that the pptx as output does not use any compression.

Currently, our workaround is to manually open and resave the file from Powerpoint, which uses compression. But it would great to have pptxgenjs do this for us. JSZip does support the "deflate" compression algorithm.

If there might be performance concerns, this could be done as an optional setting; either a flag in pptgenjs like enableCompression: true or an jszipOptions argument that is passed on to JSZip.

@gitbrent gitbrent self-assigned this Apr 21, 2020
@gitbrent gitbrent added this to the 3.3.0 milestone May 24, 2020
@gitbrent gitbrent modified the milestones: 3.3.0, 3.4.0 Jul 15, 2020
@gitbrent gitbrent modified the milestones: 3.4.0, 3.5.0 Jan 3, 2021
@gitbrent
Copy link
Owner

gitbrent commented Jan 3, 2021

The main export methods need to be updated to take options objects instead of method/export name to allow for a boolean 'compress' option, so i'm pushing to v3.5.0

branch 'zip-compression' created.

JSZip API: compression

@gitbrent gitbrent linked a pull request Jan 9, 2021 that will close this issue
@gitbrent
Copy link
Owner

gitbrent commented Jan 9, 2021

Thanks for the suggestion @pimlottc-gov

This is complete and will be in v.3.5.0 (Pull #883)

pptx.writeFile({ fileName: 'CompressDemo', compresion: true });

@gitbrent gitbrent closed this as completed Jan 9, 2021
@gitbrent gitbrent removed a link to a pull request Jan 9, 2021
gitbrent added a commit that referenced this issue Jan 9, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants