首页 新闻 会员 周边

iText pdf 导出的问题,列宽

0
[待解决问题]

如题:
使用 float 数组初始化 table,导出的pdf列宽不生效 
           

Java code?
1
2
float[] columnWidths = {203050};
           Table table = new Table(columnWidths);

 
使用 unitvalue初始化 table,导出的pdf列宽才生效
            

Java code?
1
2
3
4
5
 UnitValue[] unitValue = new UnitValue[]{
                    UnitValue.createPercentValue((float20),
                    UnitValue.createPercentValue((float30),
                    UnitValue.createPercentValue((float50)};
            Table table = new Table(unitValue );

 

为什么会出现这种情况,是iText7.0.2版本

寰殇丶天使的主页 寰殇丶天使 | 初学一级 | 园豆:199
提问于:2017-03-28 22:39
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册