我试过使用这段代码,但由于某种原因它不能工作。
var table : SimpleTable = new SimpleTable();
table.widthPercentage = 100;
table.borderWidth = 1;
var row : SimpleCell = new SimpleCell( SimpleCell.ROW );
row.border = 1;
row.borderColor = RGBColor.fromARGB( 0x555555 );
row.borderWidth = 1;
row.verticalAlignment = Element.ALIGN_MIDDLE;
var cell1 : SimpleCell = new SimpleCell( SimpleCell.CELL );
cell1.widthpercentage = 25;
cell1.verticalAlignment = Element.ALIGN_MIDDLE;
var p : Paragraph = new Paragraph( 'test', PurePDFGenerator.pdf.cyrillicFont );
p.alignment = Element.ALIGN_MIDDLE;
cell1.add( p );
row.add( cell1 );
table.add( row );的中间
发布于 2012-03-19 21:10:45
您是否尝试过在单元格级别进行水平对齐?据我所见,它应该在文档中起作用。另外,你没有把你的段落添加到你的手机里吗?
发布于 2012-05-09 20:58:30
在Paragraph.alignment工作之前,您可以使用
cell.horizontalAlignment = Element.ALIGN_CENTER;https://stackoverflow.com/questions/9774956
复制相似问题