Jump to content

Bold Doesn't work on exported pdf


eaustin

Recommended Posts

 I'm attempting to style a textfieldexpression like so:

(First code snippet)

Exporting the data as XML results in:

 (Second code snippet)

 Keep in mind I only what the static text bolded.

Any ideas as to what could going wrong?

 

Mac 10.6

Java 1.6

Jasper 3.5.3


Thanks in advance for any tips or help!

Post Edited by eaustin at 03/04/2011 20:06

Code:
<!-- Style Template --><style name="parentStyle" isDefault="true" fontName="Arial" isBold="false" fontSize="13" pdfFontName="Helvetica"/><!-- Relevant Example --><textField isStretchWithOverflow="true">            <reportElement x="200" y="0" width="200" height="15" stretchType="RelativeToTallestObject">            <property name="net.sf.jasperreports.export.pdf.tag.td" value="full"/>            </reportElement>            <box leftPadding="10">            <leftPen lineWidth="0.5"/>            <bottomPen lineWidth="0.5"/>            </box>            <textElement markup="html">            <font size="11"/>            </textElement>            <textFieldExpression><![CDATA[            "<b style='font-weight:bolder'>Account ID:</b><br/>" + $F{accountId} + "<br/><br/>" +            "<b style='font-weight:bolder'>Email Address:</b><br/>" + $F{emailAddress} + "<br/><br/>" +            "<b style='font-weight:bolder'>Status:</b><br/>" + $F{accountActiveStatus} + "<br/>" +            $F{accountLockStatus} + "<br/><br/>"            ]]></textFieldExpression>            </textField><!-- XML Output --><text textHeight="177.08496" markup="html" lineSpacingFactor="1.1499023" leadingOffset="-2.3310547">				<reportElement x="200" y="0" width="200" height="212" origin="1">					<property name="net.sf.jasperreports.export.pdf.tag.td" value="full"/>				</reportElement>				<box topPadding="3" leftPadding="10">					<leftPen lineWidth="0.5"/>					<bottomPen lineWidth="0.5"/>				</box>				<font size="11"/>				<textContent><![CDATA[<style isBold="true">Account ID:</style>FIID#.loginId10<style isBold="true">Email Address:</style>10firstname_lastname@intuit.com<style isBold="true">Status:</style>DeactivatedUnLocked<style isBold="true">Last Login:</style>Fri Mar 04 15:19:50 EST 2011]]></textContent>			</tex

Post Edited by eaustin at 03/04/2011 20:22
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 2 years later...
I had similar problem, in iReport preview was ok, but generated pdf had no any bold styles either font extension nor iReport/JasperReports library settings didn't help.

 

In my case it was enough to add one extra dependency and it helped.

 

There is a short description in below post:

 


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...