Ritesh Sood
2018-05-06 08:33:51 UTC
Office 365 has added support for SVG images. This is very useful to me as I
need to create slidedecks with ~100 slides with plots of simulation data.
Its highly desirable to have vector graphics. The simulation data is
generated on linux where I can produce eps, or svg files. XSLF has support
of eps, but images embedded in this format do not display when the pptx is
viewed in Windows. So svg is the only remaining option.
I have modified the POI source and could get it to copy the .svg file to
the ppt/media folder and add an entry in the corresponding
ppt/slides/_rels/slideX.xml.rels. However the following issue remains: When
Powerpoint adds a svg file the following appears in slide.xml:
<code>
<p:blipFill>
<a:blip r:embed="rId2">
<a:extLst>
<a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
<a14:useLocalDpi val="0" xmlns:a14="
http://schemas.microsoft.com/office/drawing/2010/main"/>
</a:ext>
<a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}">
<asvg:svgBlip r:embed="rId3" xmlns:asvg="
http://schemas.microsoft.com/office/drawing/2016/SVG/main"/>
</a:ext>
</a:extLst>
</a:blip>
<a:stretch>
<a:fillRect/>
</a:stretch>
</p:blipFill>
</code>
But with my modified POI, this is what I see:
<code>
<p:blipFill>
<a:blip r:embed="rId2"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</code>
In particular, we need to include the svgBlip element for this to work
http://interoperability.blob.core.windows.net/files/MS-ODRAWXML/[MS-ODRAWXML].pdf
Also a png copy of the svg needs to be generated (rId2 in the Powerpoint
generated code is png, and rId3 is the svg.
Help is getting this done is highly appreciated!
Thanks,
Ritesh
need to create slidedecks with ~100 slides with plots of simulation data.
Its highly desirable to have vector graphics. The simulation data is
generated on linux where I can produce eps, or svg files. XSLF has support
of eps, but images embedded in this format do not display when the pptx is
viewed in Windows. So svg is the only remaining option.
I have modified the POI source and could get it to copy the .svg file to
the ppt/media folder and add an entry in the corresponding
ppt/slides/_rels/slideX.xml.rels. However the following issue remains: When
Powerpoint adds a svg file the following appears in slide.xml:
<code>
<p:blipFill>
<a:blip r:embed="rId2">
<a:extLst>
<a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
<a14:useLocalDpi val="0" xmlns:a14="
http://schemas.microsoft.com/office/drawing/2010/main"/>
</a:ext>
<a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}">
<asvg:svgBlip r:embed="rId3" xmlns:asvg="
http://schemas.microsoft.com/office/drawing/2016/SVG/main"/>
</a:ext>
</a:extLst>
</a:blip>
<a:stretch>
<a:fillRect/>
</a:stretch>
</p:blipFill>
</code>
But with my modified POI, this is what I see:
<code>
<p:blipFill>
<a:blip r:embed="rId2"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</code>
In particular, we need to include the svgBlip element for this to work
http://interoperability.blob.core.windows.net/files/MS-ODRAWXML/[MS-ODRAWXML].pdf
Also a png copy of the svg needs to be generated (rId2 in the Powerpoint
generated code is png, and rId3 is the svg.
Help is getting this done is highly appreciated!
Thanks,
Ritesh