sagmljohn Posted March 6, 2019 Share Posted March 6, 2019 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 More sharing options...
Friendly User Posted March 11, 2019 Share Posted March 11, 2019 Hello John,this may be a fonts problem. What fonts do you use and do you get the other fields in bold or italic with the same font in resulting PDF? Link to comment Share on other sites More sharing options...
sagmljohn Posted March 21, 2019 Author Share Posted March 21, 2019 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 More sharing options...
sagmljohn Posted March 28, 2019 Author Share Posted March 28, 2019 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 More sharing options...
sagmljohn Posted April 3, 2019 Author Share Posted April 3, 2019 No longer a problem. Guy on the server side had to assign selected TTF's and we note the limited font selections. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now