I did something like this with Excel files. We wanted our reporting tool to produce Excel files. We did it by inserting data into an Excel template. This helped a lot because we can leave the details of formatting up to Excel and our reporting tool just is responsible for getting the data. The project took about two man-months, most of which was getting up to speed on Poi and Excel. I was pleased with Poi, but it appears that Poi has been used for Excel files a lot more than it has been used for PowerPoint files.
-Ralph Johnson On Fri, Dec 18, 2015 at 5:23 AM, Yegor Kozlov <[email protected]> wrote: > Consider a template approach. Create a template pptx file with video and > text placeholders. Make sure you can open it in various versions of > PowerPoint. > Use POI to modify the template and insert the actual data. Use XSLF to > update text. To replace video you will need to replace the placeholder > video files in /ppt/media/*.*, this can be done using the OpenXML4J API. > You will need to analyze the XML to know which video file belongs to which > slide, etc. > > With this approach you only update data in a file created in PowerPoint and > it should guarantee the file opens correctly everywhere . > > Regards, > Yegor > > On Fri, Dec 18, 2015 at 6:27 AM, Adolfo Rodriguez <[email protected]> > wrote: > > > Hi, we are evaluating POI to programmatically generate Powerpoint pptx > > documents with embedded video. > > We have read that (please confirm): * a powerpoint file created by the > > last Powerpoint version can be opened by any other previous Powerpoint > > version (e.g. Powerpoint 2007 can open pptx files from Powerpoint 2015) > > * a file generated by a previous Powerpoint version can have > > compatibility issues with a newer version (e.g. Powerpoint 2013 can have > > compatibility issues with a pptx created for Powerpoint 2010) > > > > Now the questions: > > * If I understand correctly, in order to generate files for all > > Powerpoint versions in market, the best strategy would be creating pptx > > files for the last version Powerpoint 2015. Is that correct? * Can > > Apache POI create Powerpoint 2015 files? * Any special consideration > > embedding video? (formats, etc..) * Is there any way to allow outlook > > running a video embedded in a presentation? (it complains about codecs > > unavailable) > > > > There is not much about this in the documentation, as far as I have seen. > > > > Regarding the file format, pptx, which is supposed to be an XML file, I > am > > a bit confused because when I try to open a pptx in linux, I just see > > binary code. I would expect a XML text file instead. Any idea? > > > > Thanks in advance > > >
