我已经创建了一个Jasper报告来显示从DB检索的文本。文本为HTML格式。在PDF中显示时,我需要设置文本的样式并对齐。这是一个来自DB的示例HTML文本
<html>
<p><b>This is Bold text</b></p>
<p> This is a paragraph whith indent</p>
<p>This is a paragra with no indent</p>
<p><center>This text should be cen
我的程序必须在PDF Acrofield上做一些样式。其中之一是将文本在多行文本域(而不是富文本域)中水平和垂直居中。我设法用下面的代码将它水平居中: var centeredField = stamper.AcroFields.GetFieldItem(field.Name);
centeredField.GetWidget(0).Put(PdfName.Q, new PdfNumber(PdfFormField.Q_CENTER)); 但是我找不到任何方法使文本垂直居中。任何帮助都是非常感谢的。