You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Shevchuk Vasyl <va...@gmail.com> on 2016/05/25 08:43:50 UTC
Apache POI 3.14 issue with tables in PPTX files
Hi everybody,
Sorry if I write to incorrect group, but I have not found any other
appropriate mailing group to clarify my issue.
I try to use your library to ganerate PNG images from PPTX slides.
Everything works fine except one issue with tables. Any tables in PPTX
files are not drawing on images. (I've tried to attach archive with sample
files but there is some email size limitation on your side. Just take a
look on file "45545_Comment.pptx" in your samples, slide 8, for example)
I spent some time to investigate this issue and have found the following
interesting part of code.
In the org.apache.poi.sl.draw.DrawTableShape class there is a method draw
public void draw(Graphics2D graphics) {
Drawable d = getDrawable(graphics);
if (d != null) {
d.draw(graphics);
}
}
it's call method getDrawable
protected Drawable getDrawable(Graphics2D graphics) {
if (shape instanceof GroupShape) {
DrawFactory df = DrawFactory.getInstance(graphics);
return df.getDrawable((GroupShape<?,?>)shape);
}
return null;
}
It's very strange. DrawTableShape class works with TableShape shape class
which is not instance of GroupShape interface. This method will always
return null and method draw will never execute "d.draw(graphics);" part of
code.
Also, I've noticed separate DrawGroupShape.java class for drawing
GroupShapes... Seems to some copy/paste issue.
I've reviewed few previous versions of library and have found the same.
Could you please clarify for me this strange part of code, or fix this bug.
Best regards,
Senior Software Developer,
Skype: vasylshevchuk
Cell: +380661044415
Vasyl Shevchuk
Re: Apache POI 3.14 issue with tables in PPTX files
Posted by kiwiwings <ki...@apache.org>.
Hi,
rendering tables in XSLF is not yet supported (see [1]) ... that's one of
the issues I'm still carrying around with me ....
As you've already mentioned, tables in HSLF are actual just a group of boxes
and lines,
therefore the groupshape rendering takes place there ...
Andi
[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=57766
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Apache-POI-3-14-issue-with-tables-in-PPTX-files-tp5723132p5723135.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org