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

Text being dropped when genrating PDF under linux


rcracel

Recommended Posts

I would like start by apologize that I will not be able to provide any samples of the problem I am experiencing due to the highly confidential data that I work with. I could try to make a mock up jrxml file to simulate this, but maybe someone else has experienced this and might have a quick easy solution.

This is a very large project and I have been trying to track this down for quite a while and I believe I just figured out why the text is actually being dropped. I will try to elaborate on that a little, but let me know if you need more details.

I have a multi page report, with multiple long text fields. Sometimes (rarely) the last couple of words on a text dropped depending on the length of the text. By the length of the text I mean an exact number of words (more accurately characters) and not necessarily the length of the text. I have checked my fonts and I know the font I am using is present and accessible in both my Windows and my Linux box, but I noticed that there is less leading space on the pdf generated under Linux, and this is what I believe might have been causing my problem.

I do appreciate any help on this matter.

RC

Post edited by: rcracel, at: 2008/03/28 15:06
Post edited by: rcracel, at: 2008/03/28 15:21

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

rcracel wrote:


I would like start by apologize that I will not be able to provide any samples of the problem I am experiencing due to the highly confidential data that I work with. I could try to make a mock up jrxml file to simulate this, but maybe someone else has experienced this and might have a quick easy solution.

This is a very large project and I have been trying to track this down for quite a while and I believe I just figured out why the text is actually being dropped. I will try to elaborate on that a little, but let me know if you need more details.

I have a multi page report, with multiple long text fields. Sometimes (rarely) the last couple of words on a text dropped depending on the length of the text. By the length of the text I mean an exact number of words (more accurately characters) and not necessarily the length of the text. I have checked my fonts and I know the font I am using is present and accessible in both my Windows and my Linux box, but I noticed that there is less leading space on the pdf generated under Linux, and this is what I believe might have been causing my problem.

I do appreciate any help on this matter.

RC

Post edited by: rcracel, at: 2008/03/28 15:06

I have exact same problem!

Link to comment
Share on other sites

I have also noticed this bug? Im using ttf fonts with my Pdf generation. Depending on the font(which leads me to suspect this maybe a ttf font specific problem), an exact number of characters is ommited from the large textfields. This varies according to the font used.
Link to comment
Share on other sites

Sorry for the delay, but here is the test case.

I have tried to debug, and found JRPdfExporter bombs on "phrase.add(chunk);" line 1629
in "protected Phrase getPhrase(JRStyledText styledText, JRPrintText textElement)" and the exception thrown is "java.lang.ClassNotFoundException: com/lowagie/text/rtf/RtfBasicElement"
it bombs when I try step into "phrase.add(chunk);"

I have included a jrxml referencing a .ttf font that works "StatementCurrentSRFont1.jrxml" and the one that bombs "StatementCurrentSRFont2.jrxml" and a test xmldatasource that I am using.

"StatementCurrentSRFont2.jrxml" is the jrxml that references "Verdana Bold Italic.ttf" and is the one that truncates the font.

Thanks again. [file name=StatementCurrentSRFont1.jrxml size=2903]

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