How does styling work within an HTML markup text field?

0

I am trying to add formatted HTML text from an existing template into a jasper report.

The field in my JRXML is defined as such:

<textField isStretchWithOverflow="true">
<reportElement x="0" y="280" width="554" height="11" uuid="bd82596b-8f07-4a28-9e5a-e7704e2ab12a">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement markup="html">
<font fontName="Arial" size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{content}]]></textFieldExpression>
</textField>
 
And a simple example of what I am trying to do:
 
<div style="padding-bottom: 10px">text</div>
<div>text</div>
 
The padding does not get added. I have tried with padding and margin and cannot get anything to work. I've also tried things like font-weight, which also did not do anything.
 
I am printing this to a PDF.
 
What am I doing wrong? I'd appreciate any help.
 
Thanks,
 
Dan
dwjxz's picture
2
Joined: Dec 3 2015 - 5:22pm
Last seen: 4 years 4 days ago

0 Answers:

No answers yet
Feedback