xlsf slides wont show charts or shapes on png export

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

xlsf slides wont show charts or shapes on png export

mrjack88
HI all, I was working with poi hslf(ppt), and it converts all slides to png images very well, but when i was about to do the same with xslf(pptx) i noticed that on the converted images charts and shapes were no showed (if i convert same presentation to to ppt, it does show it). Is this not supported yet on xlsf? Is this on the road map?. Any help would be appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: xlsf slides wont show charts or shapes on png export

kiwiwings
Hi Oscar,

the rendering code is merged into Common SL and mainly taken from XSLF.
My guess is, the missing images are chart objects or converted to EMF in XSLF,
which is not (yet) rendered/supported ... and in HSLF those charts are converted to WMF.
Neither EMF nor any chart support is on my road map - I'd prefer EMF, as this is
used more often.

Best wishes,
Andi



signature.asc (495 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xlsf slides wont show charts or shapes on png export

mrjack88
Hi there again.
Thanks for answering my question. Here i have a new one. I have a pptx file with some japanese text inside, when i got the rendered images from pptx file there are some lines that gets displayed ok, but there are some lines displayed as squares with "?" character inside. I think that if there is an encoding problem, then all lines would show up as squares; do you have a comment on this. if you need the problematic file to test it, how can i send it to you?
Cheers
Oscar
Reply | Threaded
Open this post in threaded view
|

Re: xlsf slides wont show charts or shapes on png export

Greg Woolsey
Typically when I see this, it is an issue of font availability.  Often a
file created on one system, such as Windows or Mac in the case of Excel,
use fonts that are not installed by default on the system reading and
rendering the file (often Linux based servers).  Usually missing fonts are
handled in a "best effort" manner looking for a similar font in terms of
serif/sans-serif, etc.  These substitute fonts may not have as many
characters defined as the original, which can lead to generic "missing
glyph" symbols like the "?" you see in the output.

The solution depends on the system, and is outside the scope or control of
POI.  You can load fonts at the OS level, and additionally at the Java
level, if you can package them in your code.  Be careful of licensing,
however, as many fonts are only legally installable with the proper
license, such as many fonts distributed with MS Office.  They are available
for purchase from Microsoft or one of their partners somewhere, I've seen
it before.  Google is your friend for that task.

You can also experiment with open-source fonts on your own and install
them, looking for one that supports the characters you need with metrics
close enough to the original for your purposes.

On Wed, May 17, 2017 at 10:54 AM mrjack88 <[hidden email]>
wrote:

> Hi there again.
> Thanks for answering my question. Here i have a new one. I have a pptx file
> with some japanese text inside, when i got the rendered images from pptx
> file there are some lines that gets displayed ok, but there are some lines
> displayed as squares with "?" character inside. I think that if there is an
> encoding problem, then all lines would show up as squares; do you have a
> comment on this. if you need the problematic file to test it, how can i
> send
> it to you?
> Cheers
> Oscar
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/xlsf-slides-wont-show-charts-or-shapes-on-png-export-tp5727430p5727572.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: xlsf slides wont show charts or shapes on png export

kiwiwings
In reply to this post by mrjack88
Hi Oscar,

I've implemented a glyph checker [2] and two mappings to either fully
replace a font or fallback to another font, if the font is not available or a glyph can't  be rendered.

Have a look at [1] - which also shows a convenience way to google MS fonts ;)

If you want to send me example files ... feel free to do so.

Best wishes,
Andi

[1] http://stackoverflow.com/questions/40931958/what-is-the-default-japanese-font-when-using-apache-poi-hslfslide-draw
[2] org.apache.poi.sl.draw.DrawTextParagraph.getAttributedString(...)


signature.asc (495 bytes) Download Attachment