You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Adolfo Rodriguez <pe...@yahoo.es> on 2015/12/18 04:27:49 UTC

Most compatible powerpoint strategy

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

Re: Most compatible powerpoint strategy

Posted by Ralph Johnson <jo...@cs.uiuc.edu>.
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 <ye...@dinom.ru> 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 <pe...@yahoo.es>
> 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
> >
>

Re: Most compatible powerpoint strategy

Posted by Yegor Kozlov <ye...@dinom.ru>.
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 <pe...@yahoo.es>
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
>

Re: Most compatible powerpoint strategy

Posted by Javen O'Neal <ja...@gmail.com>.
Adolfo,

> 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)

Yes, unless the workbook contains features that were added after
Powerpoint 2007. If so, Powerpoint usually degrades gracefully (the
new feature doesn't work, but doesn't prevent the slide from
displaying).

> 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)

This usually isn't the case. I know Powerpoint reports "compatibility
mode" when working with an Office 97-2003 file. I haven't personally
run into an issue where a OOXML file has issues when opened in a later
version of Powerpoint.

>  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?

The structure of a 2007, 2010, 2013, or 2015 powerpoint OOXML file is
the same. Using features that are not recognized by older versions of
Powerpoint will cause compatibility problems--but that's a limitation
with the application (Powerpoint), not the file.

>  Any special consideration embedding video? (formats, etc..)

I think this is outside the scope of the OOXML powerpoint file format,
which is what POI knows how to read and write. The binary movie file
is embedded in the powerpoint as 1s and 0s. It's up to the application
(Powerpoint) to figure out how to render that video. Assuming POI has
the ability to embed a video into a Powerpoint file, the format
shouldn't matter. Whether Powerpoint will play your video or not is a
question for the Microsoft Office team. Same answer applies if you're
trying to use LibreOffice, OpenOffice, Google Docs, or any other
application that can read Powerpoint files.

> Is there any way to allow outlook running a video embedded in a presentation? (it complains about codecs unavailable)

This is a question for the Microsoft Office team.

> 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?

The OOXML format is a zip file containing XML files and some binary
content (VBA code, printer settings, embedded pictures and video). If
you open a pptx file in a text editor, your hint that it's a zip file
is the first few characters: PK (Search for "Magic number" on
https://en.wikipedia.org/wiki/Zip_(file_format))
Powerpoint can save files as a monolothic XML file (Powerpoint saves
these with a .xml extension, not .pptx extension), but POI cannot read
or write this format.

It sounds like you're in the early phases of looking for software that
can programatically create files that can be read by Microsoft
Powerpoint. If you have other specific features that you need, you may
want to evaluate how well each library supports those features. For
example, if you plan on embedding tables, adding animations, master
slide styles, slide header and footers, page numbers, custom show
timings, custom aspect ratios, etc. Apache POI's slideshow component
is relatively young, so it may or may not be able to meet all your
needs. Even if it doesn't fully meet your needs or you discover down
the road that you want to add a feature that POI doesn't yet have, you
can contribute your changes back to the project and they will
hopefully be added in a future release. The POI community is active
and healthy, which may be worth considering in your trade study.

Cheers
Javen

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org