You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use a PdfPTable to store two PdfPCells in the same row. One PDF can be set to left aligned, where the other string is set to center aligned. However, PdfPTable assigns a certain percentage of the width to each of its cells, meaning that the center aligned string will only be within the center of the assigned width. You can manually set the widths using a lot of math such that the second column, if left aligned, will appear to be globally centered in the page.
Alternatively, you can use the ColumnText class and set up two columns of text, with one left aligned and one middle aligned. The downside to this solution is that the columns have to be manually positioned.
You can use a PdfPTable to store two PdfPCells in the same row. One PDF can be set to left aligned, where the other string is set to center aligned. However, PdfPTable assigns a certain percentage of the width to each of its cells, meaning that the center aligned string will only be within the center of the assigned width. You can manually set the widths using a lot of math such that the second column, if left aligned, will appear to be globally centered in the page.
Alternatively, you can use the ColumnText class and set up two columns of text, with one left aligned and one middle aligned. The downside to this solution is that the columns have to be manually positioned.
The text was updated successfully, but these errors were encountered: