本文介绍了使用HTML标记的Jasper中的文本对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用html标记将静态文本的文本对齐。我尝试同时具有align和text-align属性的
p标签。

I want to align text for static text with html markup. I tried forp tag with both align and text-align property. Seems that both does not take effect.

<p align="right">Right 1</p> <p text-align:right>Right 2</p>

我知道jasper报告根据

I know that jasper report supports very few of html tags according tohttp://community.jaspersoft.com/questions/539009/html-tags-supported-jasper-reports-v-371

是否可以在japser版本6.0.3上实现此目标?

Is is possible to achieve this on japser version 6.0.3?

任何帮助将不胜感激。

推荐答案

使用< textField> < textElement markup = html /> 一起使用时,您只能设置文本的外观格式。 (颜色,粗体,下划线等)。

Using <textField> with <textElement markup="html"/> you can only format how the text looks. (color,bold,underline ecc).

此功能用于生成样式文字

Teodord (碧玉报表工作人员)

Quoting Teodord (jasper report staff)

但是您可以测试< hc:html> 组件,这将呈现html图像。

However you could test the <hc:html> component, this will render an image of you html.

注意:这是不正确的html < p text-align:right> 应该是< p style ='text-align:right'> ,但不会有任何区别。

Note: this is not correct html <p text-align:right> it should be <p style='text-align:right'>, but it will not make any difference.

这篇关于使用HTML标记的Jasper中的文本对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 02:44