Hi Andi,

thanks for your input. I have looked at the code you've pointed to for
including extension elements. However, given my limited fluency with
xml/xsd, and even java, I really couldn't figure out how to go about this.
I earlier breakpointed at
https://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java?view=markup#l76
and seemed to me that that's where change needed to be made. Not sure how
to incorporate the XSLFShape.getXmlObject() method that you pointed to.

Looks like I'll have to put in a feature request for this and wait.

Thanks,
Ritesh


On Sun, May 6, 2018 at 3:02 AM Andreas Beeker <kiwiwi...@apache.org> wrote:

> Hi Ritesh,
>
> generating the png thumbnails should be possible with Batik [1].
>
> Adding those extension elements should be possible via the
> XSLFShape.getXmlObject() method.
> If the xmlschema doesn't provide you with the accessors, you need to use a
> XmlCursor [2]
> to add the elements.
>
> When using those features, Office usually uses AlternateContent elements,
> to provide additionally
> a fallback structure. You don't need to provide the AlternateContent
> wrapper but insert
> either the choice or fallback element directly.
>
> If you intend to read and then modify files (template approach), please
> make sure to use a trunk version of POI,
> as I've included an additional schema for handling AlternateContents ...
> otherwise those
> elements are ignored (... sometimes).
>
> Andi
>
>
> [1] https://xmlgraphics.apache.org/batik/
> [2]
> https://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFObjectShape.java?view=markup#l281
>
>
>

Reply via email to