andrey_nado Posted July 19, 2008 Share Posted July 19, 2008 Hello!I'm building report with isStretchWithOverflow="true". In most cases it works fine, and height of the report line fits the amount of text data.But sometimes text field is followed by empty line, the text perfectly fits one line though. I found that when text is exactly as wide as column (no need for wrapping and no space remaining to the right of text), it is followed by empty line.How can I elimitate this?Regards,Andrey Link to comment Share on other sites More sharing options...
andrey_nado Posted July 22, 2008 Author Share Posted July 22, 2008 Any replies? Link to comment Share on other sites More sharing options...
lucianc Posted July 22, 2008 Share Posted July 22, 2008 Do you have a concrete example for this? That would make identifying what actually happens a lot easier.Regards,Lucian Link to comment Share on other sites More sharing options...
andrey_nado Posted August 7, 2008 Author Share Posted August 7, 2008 Please see attached JRXML example. When I render report (in PDF format) with such a field and value, text is rendered in single line, but text element occupies two lines. Link to comment Share on other sites More sharing options...
lucianc Posted August 8, 2008 Share Posted August 8, 2008 This is probably a mismatch between the Java and PDF fonts used by the text field, see this FAQ.Regards,Lucian Link to comment Share on other sites More sharing options...
andrey_nado Posted August 8, 2008 Author Share Posted August 8, 2008 I changed <font> definition to following:<font fontName="arialbd.ttf" pdfFontName="arialbd.ttf" size="9" isBold="true"/>As far as I understand, "fontName" attribute links to the font used for report building, and "pdfFontName" is simply the name of the font to be embedded into PDF document. Now these two fonts are identical (refer to the same TFF file). My problem still exists.I also tried to turn on option net.sf.jasperreports.export.pdf.force.linebreak.polic and it didn't help. What can I do else? Link to comment Share on other sites More sharing options...
lucianc Posted August 11, 2008 Share Posted August 11, 2008 The fontName attribute needs to contain a name of a font/family available in the JVM, and not the location of the *.ttf file. Try using fontName="Arial", and make sure that the Arial font is installed and available in Java.Regards,Lucian 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