edi9999/docxtemplater — pull request #93 by tdonia (2014-10-19 04:51:30+00:00)
Title: Add pptx support

Hey @edi9999 - thanks for creating this and sharing! it's added years to my life. We're going to use it to output some tables into PPTX so this branch adds support for .pptx files. It should be completely compatible with upstream/master / tests all seem to pass. a few kludges to be aware of:

- 459a3b1bf6db15a8770f55e69fb170f0c1bf157e : since pptx files can have _n_ slides, we need to create an array of templateFiles that'll look through them all. short of using `fs` to index all of the files in `ppt/slides/slide_.xml` we can stub in a big number of them and rely on the [checks below](https://github.com/edi9999/docxtemplater/blob/master/coffee/docxgen.coffee#L59) to keep things sane.

- there was a strange bug with multi-slide decks getting a 'PPT found content it could not understand' error when space preserve was active. not sure why it was OK with a single slide deck, but in any case, per 18287176c561702e5bf6046e1a4fb2c28b2023a5 the space preserve option is ignored for when the filetype is pptx

- i haven't touched any of the QR/image replacement/management code. all of that will be disabled for my use case / i'm not sure what it's intended to do - but it might just work? not sure.

feedback welcome! hope this is useful to someone.