简体   繁体   English

iText对齐单元格6级

[英]iText alignment cell 6 levels

In my project, I'm using iText to print a dynamic table on PDF. 在我的项目中,我正在使用iText在PDF上打印动态表格。

There are 6 different levels in my enumeration. 我的枚举有6个不同的级别。 I want to align every level a little bit more to right. 我想使每个级别更加向右对齐。

In iText, there is a function: cell.setHorizontalAlignment() 在iText中,有一个函数: cell.setHorizo​​ntalAlignment()

The problem is that you can only choice between: LEFT, CENTER and RIGHT Any possible solutions for this? 问题是您只能在以下选项中选择:LEFT,CENTER和RIGHT是否有任何可能的解决方案?

An example of what I want: 我想要的一个例子:

1
  2
    3
      4
        5
          6

If you want to change the indentation inside a cell, one way is to change the indentation at the level of the Paragraph objects you're adding to the cell. 如果要更改单元格内的缩进,一种方法是在要添加到该单元格的Paragraph对象级别上更改缩进。 Another way would be to change the padding of the cell (you can change the padding on all sides, or on the right, level, top and bottom separately). 另一种方法是更改​​单元格的填充(您可以在所有侧面或右侧,水平,顶部和底部分别更改填充)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM