其中之一是将文本在多行文本域(而不是富文本域)中水平和垂直居中。我设法用下面的代码将它水平居中: var centeredField = stamper.AcroFields.GetFieldItem(field.Name);
centeredField.GetWidget(0).Put(PdfName.Q, new PdfNumber(PdfFormField.Q_CENTER)); 但是我找不到任何方法使文本垂直居中。
我正在写一个标题,所以文本的大小很大,所以换行符是从左边开始的,但我想让它从中间开始。 示例:文本当前是这样显示的。 This is a new line 我正在使用这个代码 Text("Please Contact us in the morning timings are 10 AM to 12 AM",
style: Theme.of(context).textTheme.headline5,),