I raised a bug - https://bz.apache.org/bugzilla/show_bug.cgi?id=63013
It looks like a missing setter to me.
If you can create your own subclass of XWPFRun, you could try this extra
method:
public void setLang(String lang) {
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
On 17.12.18 22:17, paoim101084 wrote:
Do you know how to autoResize the column in XSLFTable?
I got painful when I use XSLFTable. I cannot calculate the exact table
height.
I've just realized that the table height is not updated [1], only the bounding
boxes of the cells are updated on renderin
Well, I try with 4.0.1, I still got error:
java.lang.ClassCastException: org.apache.poi.ooxml.POIXMLDocumentPart cannot
be cast to org.apache.poi.xslf.usermodel.XSLFPictureData
at
org.apache.poi.xslf.usermodel.XSLFSheet.importBlip(XSLFSheet.java:651)
at
org.apache.poi.xslf.usermode
Yes, I have two issues when I used XSLFTable.
1. Display text does not fit with column.
For example, less text should display in small column. long text should
display in big column.
2. Calculate table's height, so I can display two or more tables in the same
slide.
I mean after display one table
@Kiwiwings:
Now I have modified your code to make similar on what I did in actual
project.
Here is the whole demo code:
import java.awt.Color;
import java.awt.geom.Rectangle2D;
import java.io.FileOutputStream;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
On 18.12.18 16:46, paoim101084 wrote:
Yes, I have two issues when I used XSLFTable.
1. Display text does not fit with column.
For example, less text should display in small column. long text should
display in big column.
2. Calculate table's height, so I can display two or more tables in the sam
Hi Andi,
Thank for detail explanation.
I am looking forward to getting the @2.
--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For addition
Do you know to add custom font to XSLFTextRun?
For example, I have font file with extension '.ttf'.
Currently, I did like this:
XSLFTextParagraph p =...
XSLFTextRun r = p.addNewTextRun();
r.setFontFamily("input/myfont.ttf");
Please advise?
--
Sent from: http://apache-poi.1045710.n5.nabble.co
- You need to register font first - just google for "GraphicsEnvironment
registerFont"
https://stackoverflow.com/search?q=%5Bjava%5D+GraphicsEnvironment+registerFont
- then simply set the font name as font family
-
To unsubscr
1. Register Font
Font font = Font.createFont(Font.TRUETYPE_FONT, new
File("input/myfont.ttf"));
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(font);
String[] names = ge.getAvailableFontFamilyNames();
2. Set font name as font family:
XSLFTextParagraph p
On 18.12.18 20:47, paoim101084 wrote:
Will support all available font family or just get the last one of Array?
Although you could easily try that yourself, before posting in the mailing list - the answer is: "it
depends", not all font families can be used in Powerpoint - I would only use True
Hi Andi,
Thank for your detail information.
Yes, I want to calculate the table height.
Could you help to provide some idea about that?
Here is what I did but it seems not work well:
static void calculateTableHeight(XSLFTable tab, Rectangle2D anchor) {//FIXME
- issue?
double total
I've applied a patch via #63017 [1]
So have a look at [2] at method testResize().
This should be somehow what you want - add rows until a max size is reached and
then
continue on the next page.
The dimensions are only approx. correct - hence I've added the rendering via
PPTX2PNG -
which you mi
13 matches
Mail list logo