-
Notifications
You must be signed in to change notification settings - Fork 1
Microsoft PowerPoint (.pptx) customization
In addition to text replacement on slides, docgen can apply a custom theme to produce a presentation deck tailored to a particular audience. To use this feature, you must prepare a .pptx or .potx file with a PowerPoint "template" (theme) stored in the zipped package (that is, the .pptx
file) as ppt/theme/theme1.xml
.
Do not create a "themed deck" by hacking up the slides individually. Docgen will not recognize this as any sort of "theme."
Here is a Microsoft support page that explains how to create a custom theme in PowerPoint: https://support.office.com/en-us/article/Create-your-own-theme-in-PowerPoint-83e68627-2c17-454a-9fd8-62deb81951a6
Basic support for slide insertion. Has not been tested on complicated PowerPoint files.
Usage:
In the base presentation, define hidden slides that have text like "Insertion point 1", "Insertion point 2", etc.
Create a separate presentation for each set of slides that you may insert into a base deck.
Call the process
method of docgen
passing argument like the following:
docgen.process 1, 'pptx', base_presentation_filename, slide_sets
Where the first argument identifies a document set, the second argument specifies the file type to be processed, the third argument is the filename of the base presentation, and the fourth argument is an array of SlideSet objects. A SlideSet object is a container with the text to be found on an "insertion point" slide and the pptx package to be inserted at that point.
Better documentation is forthcoming. In the meantime, please read the rspec
examples to see how this works.