You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Eliot Kimber <dr...@gmail.com> on 2013/05/17 23:13:42 UTC

Contributing to XSLF Code

I am trying to use the XSLF code to implement manipulation and generation
of PPTX presentations. I see that there are still some missing features and
bugs. I am more than happy to contribute to the code to fill in some of the
features I'm looking for. But I didn't want to start writing patches
without checking what was already under way.

My first task is to implement a PPTX "burster" that can produce a set of
single-slide presentations from an existing presentation. I see that this
task was discussed in the mailing list and some workaround code was
provided. But it seems like it would be better to simply make the base code
do the right thing in this case and I'd like to tackle that if it's not
already in the process of being addressed.

I will also want to implement the reverse of the burster: given a set of
single-slide slideshows, create a new slide show reflecting all the slides
and their dependencies.

I'm also working on code to generate new slides from a simple XML format
that represents generic slide show content (that is, something that is
relatively easy to generate from other stuff, like existing XML or
whatever).

Is there a documented roadmap or set of implementation tasks I can use to
guide my work or should I just dive in?

For my slide burster I was expecting a method like "importSlide" that would
take a slide from an existing slideshow and add it, and its dependencies,
to the importing slideshow. But it looks like that method doesn't exist.

That's as an alternative to copying the slide show, deleting all the slides
but the one you want, and then saving it, which seems a bit inefficient.

Thanks,

Eliot
-- 
Eliot Kimber

RE: Contributing to XSLF Code

Posted by honyk <j....@email.cz>.
> I'm also working on code to generate new slides from a simple XML
> format
> that represents generic slide show content (that is, something that is
> relatively easy to generate from other stuff, like existing XML or
> whatever).

Recently I've investigated possibilities to convert DocBook XML (a subset only) into PPTX directly, but I've given this up.

1. PPTX vocabulary is too complex 
2. There are limitations in XSLT in determining the available space for laying objects out on the slide (and handling overflows to next page if needed). I wish it was supported by any XSL-FO processor.
3. I ended up in generating PDF slides from XSL-FO and converting this PDF into PPTX using the Adobe Acrobat XI. While this conversion is not mature yet, the output is far better than from other tools I tested.
4. Previous step cannot handle features like slide notes. And this is the reason why I've joined the POI dev list :-)  While reading notes is supported, there is no way to insert your own into the existing presentation. I'd like to help with it.

Jan


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


Re: Contributing to XSLF Code

Posted by Dave Fisher <da...@comcast.net>.
On May 17, 2013, at 2:26 PM, Nick Burch wrote:

> On Fri, 17 May 2013, Eliot Kimber wrote:
>> I am trying to use the XSLF code to implement manipulation and generation of PPTX presentations. I see that there are still some missing features and bugs. I am more than happy to contribute to the code to fill in some of the features I'm looking for. But I didn't want to start writing patches without checking what was already under way.
> 
> Most of the work on XSLF has been done by Yegor. (I did a bit at the start around text extraction, then he put most of the work in for the rest!). The remainder comes from user contributions, which we're always very keen to get!
> 
> Yegor is currently a bit snowed-under at work, so I don't believe he's currently working on any XSLF code. If it's in SVN with a TODO, consider it fair game to implement! If it's a new feature, probably best post something here for a sanity check, then go ahead if no-one spots a problem with your plan

Yes, Yegor is certainly snowed under at work. Also, there is some work yet to be contributed that we have done over XSLF that may be helpful. I would suggest that you communicate your thoughts clearly on the ML about any API changes that you would find helpful.

> 
>> My first task is to implement a PPTX "burster" that can produce a set of single-slide presentations from an existing presentation. I see that this task was discussed in the mailing list and some workaround code was provided. But it seems like it would be better to simply make the base code do the right thing in this case and I'd like to tackle that if it's not already in the process of being addressed.
> 
> I'd suggest you take that code, fix it and finish it, write some unit tests, then contribute a patch for it. Ideally it would probably be something like a utility that works on XSLF slideshows to produce new ones, or something like that, with most of the logic on the main XSLF classes

Yegor and I certainly have continued interest in this area even if our attention is currently elsewhere. It would be great to see what you propose.

> 
>> I'm also working on code to generate new slides from a simple XML format that represents generic slide show content (that is, something that is relatively easy to generate from other stuff, like existing XML or whatever).
> 
> Have you seen the HSLF stuff for producing .ppt files, from java awt-style code and the like?

This is a place to look.

Regards,
Dave


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


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


Re: Contributing to XSLF Code

Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 17 May 2013, Eliot Kimber wrote:
> I am trying to use the XSLF code to implement manipulation and 
> generation of PPTX presentations. I see that there are still some 
> missing features and bugs. I am more than happy to contribute to the 
> code to fill in some of the features I'm looking for. But I didn't want 
> to start writing patches without checking what was already under way.

Most of the work on XSLF has been done by Yegor. (I did a bit at the start 
around text extraction, then he put most of the work in for the rest!). 
The remainder comes from user contributions, which we're always very keen 
to get!

Yegor is currently a bit snowed-under at work, so I don't believe he's 
currently working on any XSLF code. If it's in SVN with a TODO, consider 
it fair game to implement! If it's a new feature, probably best post 
something here for a sanity check, then go ahead if no-one spots a problem 
with your plan

> My first task is to implement a PPTX "burster" that can produce a set of 
> single-slide presentations from an existing presentation. I see that 
> this task was discussed in the mailing list and some workaround code was 
> provided. But it seems like it would be better to simply make the base 
> code do the right thing in this case and I'd like to tackle that if it's 
> not already in the process of being addressed.

I'd suggest you take that code, fix it and finish it, write some unit 
tests, then contribute a patch for it. Ideally it would probably be 
something like a utility that works on XSLF slideshows to produce new 
ones, or something like that, with most of the logic on the main XSLF 
classes

> I'm also working on code to generate new slides from a simple XML format 
> that represents generic slide show content (that is, something that is 
> relatively easy to generate from other stuff, like existing XML or 
> whatever).

Have you seen the HSLF stuff for producing .ppt files, from java awt-style 
code and the like?

Nick

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


Re: Contributing to XSLF Code

Posted by Yegor Kozlov <ye...@dinom.ru>.
Hi Eliot,

I'm happy to see that people use my code . You are very much welcome
to contribute!

I don't think that any part of XLSF is under way. What is in SVN is
the current state.
It makes sense to check POI Bugzilla and the dev list and see if there
are related patches .

> My first task is to implement a PPTX "burster" that can produce a set of
> single-slide presentations from an existing presentation.

Have a look at the "pptx merger" example:

https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/MergePresentations.java

You can use it to chop a .pptx file into single-slide presentations.
Note that there are two similar methods:
XSLFSheet.appendContent and XSLFSheet.importContent.

The first one keeps existing shapes. The second method completly
replaces current content .

A reverse booster can use the same approach.

> I'm also working on code to generate new slides from a simple XML format
> that represents generic slide show content (that is, something that is
> relatively easy to generate from other stuff, like existing XML or
> whatever).

If I did it, I would make it a simplified dialect of html with title,
body tags, etc.
I don't think a generic html2pptx renderer is possible, but a
simplified generator from a number of pre-defined formats is certainly
possible.
The pre-defined html layouts will follow PowerPoint's layouts: title
only, title and body, etc.

Regards,
Yegor

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


RE: Contributing to XSLF Code

Posted by honyk <j....@email.cz>.
> FOP will compute the layout and call XLSF to build the presentation.

For single source workflows based on XML this would be a breakthrough. As
I've written, I was surprised no XSL-FO processor supports this yet (despite
it makes lot of sense).

> FOP provides a pluggable API for output format writers: there are
> writers for PDF, RTF, text, awt, etc. We can try to hook a writer for
> PPTX .

I like this idea. We definitely should try this. I am just afraid none of us
has free time to dive into it intensively. But it could be a nice GSoC
project :-)

Jan

> -----Original Message-----
> From: Yegor Kozlov [mailto:yegor.kozlov@dinom.ru]
> Sent: Tuesday, May 21, 2013 6:58 AM
> To: POI Developers List
> Subject: Re: Contributing to XSLF Code
> 
> Fiddling with direct manipulation of OOXML is not to be relied on. The
> vocabulary is too complex and the whole approach will be clumsy.
> 
> I thought about a XLSF-FOP plugin too but gave up because of lack of
> time.
> FOP provides a pluggable API for output format writers: there are
> writers for PDF, RTF, text, awt, etc. We can try to hook a writer for
> PPTX .
> FOP will compute the layout and call XLSF to build the presentation.
> I'm not fully sure that it will work but the idea is worth trying.
> 
> Technically speaking, adding support for notes in XLSF is not that
> hard. The best way to understand how Presenatation ML does it is to
> create two simple presentations: one without notes and the other with
> a notes attached. Then unzip and diff the files.
> 
> Yegor
> 
> On Mon, May 20, 2013 at 9:52 PM, honyk <j....@email.cz> wrote:
> >> I'm also working on code to generate new slides from a simple XML
> >> format
> >> that represents generic slide show content (that is, something that
> is
> >> relatively easy to generate from other stuff, like existing XML or
> >> whatever).
> >
> > Recently I've investigated possibilities to convert DocBook XML (a
> subset only) into PPTX directly, but I've given this up.
> >
> > 1. PPTX vocabulary is too complex
> > 2. There are limitations in XSLT in determining the available space
> for laying objects out on the slide (and handling overflows to next
> page if needed). I wish it was supported by any XSL-FO processor.
> > 3. I ended up in generating PDF slides from XSL-FO and converting
> this PDF into PPTX using the Adobe Acrobat XI. While this conversion is
> not mature yet, the output is far better than from other tools I
> tested.
> > 4. Previous step cannot handle features like slide notes. And this is
> the reason why I've joined the POI dev list :-)  While reading notes is
> supported, there is no way to insert your own into the existing
> presentation. I'd like to help with it.
> >
> > Jan
> >
> >


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


Re: Contributing to XSLF Code

Posted by Yegor Kozlov <ye...@dinom.ru>.
Fiddling with direct manipulation of OOXML is not to be relied on. The
vocabulary is too complex and the whole approach will be clumsy.

I thought about a XLSF-FOP plugin too but gave up because of lack of time.
FOP provides a pluggable API for output format writers: there are
writers for PDF, RTF, text, awt, etc. We can try to hook a writer for
PPTX .
FOP will compute the layout and call XLSF to build the presentation.
I'm not fully sure that it will work but the idea is worth trying.

Technically speaking, adding support for notes in XLSF is not that
hard. The best way to understand how Presenatation ML does it is to
create two simple presentations: one without notes and the other with
a notes attached. Then unzip and diff the files.

Yegor

On Mon, May 20, 2013 at 9:52 PM, honyk <j....@email.cz> wrote:
>> I'm also working on code to generate new slides from a simple XML
>> format
>> that represents generic slide show content (that is, something that is
>> relatively easy to generate from other stuff, like existing XML or
>> whatever).
>
> Recently I've investigated possibilities to convert DocBook XML (a subset only) into PPTX directly, but I've given this up.
>
> 1. PPTX vocabulary is too complex
> 2. There are limitations in XSLT in determining the available space for laying objects out on the slide (and handling overflows to next page if needed). I wish it was supported by any XSL-FO processor.
> 3. I ended up in generating PDF slides from XSL-FO and converting this PDF into PPTX using the Adobe Acrobat XI. While this conversion is not mature yet, the output is far better than from other tools I tested.
> 4. Previous step cannot handle features like slide notes. And this is the reason why I've joined the POI dev list :-)  While reading notes is supported, there is no way to insert your own into the existing presentation. I'd like to help with it.
>
> Jan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>

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