gitbrent / PptxGenJS

Create PowerPoint presentations with a powerful, concise JavaScript API.
https://gitbrent.github.io/PptxGenJS/
MIT License
2.84k stars 625 forks source link

Size difference in PPT generated from library #1268

Open axcl opened 1 year ago

axcl commented 1 year ago

Thanks for this awesome plugin.

Currently i am facing a weird issue, in which PPTX size differs when generated from the plugin and after saving it through MS Powerpoint or Libreoffice size shrinks significatanly.

Even I tried PPTx from the demo, pptx size after download is ~45KB but after opening and saving it from the desktop applications such as Libreoffice / MS Powerpoint size reduced to ~25Kb.

After adding approx 15 slides this goes to like differences in MBs. Generated PPT from PPTGenJS is approx 4MB and after saving size reduced to 700KB.

I have tried removing images, because I was assuming maybe images used in master slide are added repeatedly for each slide but no, issue is something else. PptxGenJS-Demo.pptx PptxGenJS-Demo Without Saving from Powerpoint.pptx

EnricoPinheiro commented 1 year ago

I could only manage the issue when i figured how to capture the real size of the image , either with a new library called 'probe-image-size', that fixed my issue in the back-end, or some other way.