我想将静态文本的文本与 html 标记对齐。我试过
p 标签同时具有 align 和 text-align 属性。似乎两者都没有生效。
<p align="right">Right 1</p> <p text-align:right>Right 2</p>
我知道 jasper 报告支持很少的 html 标签根据
http://community.jaspersoft.com/questions/539009/html-tags-supported-jasper-reports-v-371
是否有可能在 japser 版本 6.0.3 上实现这一点?
非常感谢任何帮助。
使用 <textField>
与 <textElement markup="html"/>
您只能格式化文本的外观。 (颜色、粗体、下划线 ecc)。
此功能用于生成样式文本。
Quoting Teodord(碧 Jade 报告人员)
The alignment is not among supported styling because it is not about
how text characters look, but about how you lay them out. We cannot
change the alignment of text within the same text field element.
但是你可以测试 <hc:html>
组件,这将呈现您的图像 html。
注意:这不是正确的 html <p text-align:right>
应该是<p style='text-align:right'>
, 但不会有任何区别。