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

RTF rendering when generating PDF


sagmljohn

Recommended Posts

Hello,

I've seen this unanswered before but maybe my situation is different:

I have a text field that simply references a table field. The field is in RTF format and I define it with rtf markup. When I preview it in Jaspersoft Studio, bold, italics, and weird fonts work fine.

I store the jrxml source for a separate engine to compile, create a JasperPrint object, and export it to a PDF. Somewhere along the line, the RTF tags are ignore except for underline. Is there something that Java "engine" process is missing?

Thanks,

-- John

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Sorry for delay. Wife went into hospital right after I asked this. Out and good now. Anyway...

The data is edited with a Windows Word component so the user controls the font. Here is how most of their RTF's start:

{rtf1ansiansicpg1252uc1htmautspdeff2{fonttbl{f0fcharset0 Times New Roman;}{f2fcharset0 Segoe UI;}}

The default selection is Segoe UI for some reason, but I selected Arial and Times New Roman and bold / italics doesn't work for them either when it comes to the final product - the PDF. I'm afraid I just compose the reports and pass the jrxml to the server guy (jrxml is in a table field that is compiled as part of the whole "engine" process). I'm wondering if there's a jar or something missing on the JasperPrint side. I could tell him that he needs a library or file of some sort.

 

Thanks!

-- John

Link to comment
Share on other sites

Ignore all that I said about server engines. The same happens when I simply export a previewed document to a PDF. The main question is this:

How can I get PDF documents to render RTF controls like RTF documents do? If I export to an RTF, I get bold, italic, etc. but PDF doesn't.

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...