iTextsharp, PdfPCell.VerticalAlignment and PdfPCell.HorizontalAlignment

前端 未结 4 626
再見小時候
再見小時候 2021-02-05 04:15

Im trying to figure out how to get my text inside a PdfPCell to show in the middle. I have tried many different options, like:

myCell.VerticalAlignment = Element.ALIG         


        
4条回答
  •  时光说笑
    2021-02-05 04:56

    I tried giving direct integers and other solutions mentioned here. But nothing worked for me. A combination of this worked for me in Composition method.

    cell.HorizontalAlignment = Element.ALIGN_CENTER;
    cell.VerticalAlignment = Element.ALIGN_MIDDLE;
    

提交回复
热议问题