iText生成Word怎么设置直线颜色,宽度属性?师兄们来救小弟于水深火热之中吧,换个别的方式POI,Jacob能实现也行。
导出word的资料网上不多,找了好久,发现都是粘贴复制的雷同信息,没有能找到我要查的设置直线颜色,宽度属性的介绍,去下了个iText API,也因小弟寒酸的英语,未能搞定。。。求师门赐教啊。。。
[解决办法]
RtfShapePosition position;
position = new RtfShapePosition(150, 0, 10400, 170);
position.setXRelativePos(RtfShapePosition.POSITION_X_RELATIVE_MARGIN);
position.setYRelativePos(RtfShapePosition.POSITION_Y_RELATIVE_PARAGRAPH);
RtfShape shape = new RtfShape(RtfShape.SHAPE_RECTANGLE, position);
RtfShapeProperty property = new RtfShapeProperty(RtfShapeProperty.PROPERTY_LINE_COLOR,Color.RED);
shape.setProperty(property);
Paragraph p1 = new Paragraph(shape);
document.add(p1);
[解决办法]
1#方法不错