iTextSharp center align objects within the Document object

后端 未结 6 1771
面向向阳花
面向向阳花 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:34

    The easier way to align paragraph will be I think

    Dim para = New Paragraph("Header")
        para.SpacingBefore = 20
        para.SpacingAfter = 20
        para.Alignment = 1 '0-Left, 1 middle,2 Right
        Document.Add(para)
    

提交回复
热议问题