How to position and wrap long text?

前端 未结 2 1910
我寻月下人不归
我寻月下人不归 2020-12-13 19:57

The PDF I can produce at the moment:
(source: yart.com.au)

I want the text to fill up the space in the lower left. How can I do that? Thanks!

2条回答
  •  春和景丽
    2020-12-13 20:13

    Solved

      PdfContentByte cb = writer.DirectContent;
      ColumnText ct = new ColumnText(cb);
      ct.SetSimpleColumn(new Phrase(new Chunk(text, FontFactory.GetFont(FontFactory.HELVETICA, 18, Font.NORMAL))),
                         46, 190, 530, 36, 25, Element.ALIGN_LEFT | Element.ALIGN_TOP);
      ct.Go(); 
    

提交回复
热议问题