Thanks for using our products.
In order to display the contents as center aligned, you can simply specify the text alignment value as center for the table cell containing HTML string. For that reason, simply specify the value of Alignment property of Cell object as Center and use the following simple HTML string
. As per your code, you can use the following code line
xcell.Alignment = Aspose.Pdf.AlignmentType.Center
In order to specify the HTML text as Bold or Italic, you can specify this information in HTML text or even you can use IsTrueTypeFontBold or IsTrueTypeFontItalic properties of TextInfo class to accomplish your requirement. In case I have not properly understood your requirement or you have any further query, please feel free to contact.
We apologize for your inconvenience.
PS, I have attached the sample PDF document with text contents as center aligned, that I have generated during my testing.