Jump to content
We've recently updated our Privacy Statement, available here ×

Report generated in PDF loses HTML formatation


tinti

Recommended Posts

I have a report with a TextField with markup set to "html".
In this TextField, I have an HTML code with tags like <b> or <i>, where words should appear in Bold or Italic.

Viewing the report by iReport, the formatting of words appear correctly.
The problem is when I export the report to PDF.

The exported report does not present the formatting of HTML code.

Someone help me, urgent.

Thanks in advance, and sorry for my English.
I am using a translator.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

This is because in PDF, you need special TTF files to draw bold or italic.

I suggest you upgrade to the latest JR version and make use of font extension support.

With font extensions, you would be mapping and packaging up TTF files to use with your reports everywhere they run.

Check the /demo/fonts folder of the JR project to see what a font extension is made of. You'll find the font mappings in the fonts.xml file.

 

You could also use the latest iR to create font extension JARs using a font extension wizard. If you use fonts only from font extensions that you provide in the classpath of your application, you'll not have this problem.

 

Check the /demo/samples/styledtext and /demo/samples/markup samples in the JR project, and see how they are using fonts from the /demo/fonts font extension which contains the DejaVu open source fonts.

 

I hope this helps.
Teodor

 



Post Edited by teodord at 11/24/2009 11:23
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...