• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4716
  • Last Modified:

How to create a report using iReport, set bold for some words in TextField and exports to PDF using jasper reports?


I'm using iReport 3.5.2, jasperreports-3.5.2.jar, iText-2.1.0.jar in my application. When I'm using the iReport, the report shows ok, with bold in some words. But when I'm exporting to PDF in my application, the words appear without bold.

What's the problem?

I'm sending the report attached.

Thanks a lot.  Ato028.txt
  • 4
1 Solution
How do you export to PDF, it is probably the cause of the error.
arthur_infoAuthor Commented:
Well... It's a big routine... It's attached in 2 files, the "Report.zip" that has the routine to generate the report and "Source.zip" that it's a sample of use of the jar created by "Report.zip". But searching here I think that is missing some library... Somebody knows something about this?

Thanks a lot...
Murali MurugesanFull stack Java developerCommented:
check the following,

1. IText version used by ireport and your application.
2. Check whether the font you apply for PDF export is reflected correctly from your application.


7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

arthur_infoAuthor Commented:
iText: 2.1.0. The fonts are correct, I think. I'm sending the screens attached.

arthur_infoAuthor Commented:
Sending other printscreens...
arthur_infoAuthor Commented:
I discovered the answer...

I need to put "<style isBold=\"true\" fontSize=\"12\" pdfFontName=\"Helvetica-Bold\">$F{FIELD}</style>"

and not "<style isBold=\"true\" fontSize=\"12\"\">$F{FIELD}</style>

This way works fine.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now