How to position and wrap long text?

前端 未结 2 1902
我寻月下人不归
我寻月下人不归 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(); 
    
    0 讨论(0)
  • 2020-12-13 20:14

    For Cocoa Dev, yeah we can set line spacing for the text using PdfPCell's SetLeading property as: PdfPCell.SetLeading(float fixedleading, float multiplied leading);

    0 讨论(0)
提交回复
热议问题