iTextSharp center align objects within the Document object

后端 未结 6 1763
面向向阳花
面向向阳花 2021-02-12 14:56

Is there a quick and simple way to center align objects within the Document object? Without performing any calculation logic, ie. Get width of page, get width

6条回答
  •  攒了一身酷
    2021-02-12 15:42

    the equivalent replacement for iTextSharp :

    paragraph.Alignment = Element.ALIGN_CENTER;
    

    or try this way

    paragraph.IndentationRight = 100;
    paragraph.IndentationLeft = 100;
    

提交回复
热议问题