Jump to content
Changes to the Jaspersoft community edition download ×

Losing some text on a page break


2005 IR Help

Recommended Posts

By: jwc - jwcone

Losing some text on a page break

2004-08-13 14:21

I have a report with a text field (isStretchWithOverflow set to true) in the detail band. Wherever there is a page break there is text missing between the last line of one page and the first line of the next.

 

Any ideas as to what's going on?

 

Thanks for any assistance.

 

 

 

 

By: jwc - jwcone

RE: Losing some text on a page break

2004-08-13 20:22

Apparently this is connected to the font. My report was using a textElement like this:

 

<textElement>

<font size="12" pdfFontName="Courier"/>

</textElement>

 

If I change the font tag like this:

<font size="12" fontName="Times New Roman"/>

 

Then I no longer lose the data when the page breaks. (My final report is being exported to PDF)

 

Bug?

 

 

 

 

By: jwc - jwcone

RE: Losing some text on a page break

2004-08-13 20:51

Looking more like ignorance on my part rather than a bug. I think I need to look into embedding the pdf font and/or installing the correct font on my server. Still, any tips are appreciated.

 

 

 

 

By: jwc - jwcone

RE: Losing some text on a page break

2004-08-13 22:46

Okay, I think I figured it out.

 

It looks like the report was being compiled with whatever the default font is, but being converted to PDF using the (larger) Courier font. I guess the conversion works on a page at a time, and converting it to a larger font was dropping text. (That's just an educated guess, but it makes sense).

 

I solved it by installing the Courier New font on my Linux server and then specifying my font tag like this:

 

<font size="12" fontName="Courier New" pdfEncoding="UTF-8" pdfFontName="/usr/local/java/jre/lib/fonts/cour.ttf" isPdfEmbedded="true"/>

 

If anyone has any comments let me know

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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