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

Text is not shown completely, please help!


psentosa

Recommended Posts

Hi all,

I made a report using fontName="SansSerif" and having a jar extension for fonts on the classpath.

Inside the fonts.xml, I define the following:

<bean id="sansSerifFamily" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily">        <property name="name" value="SansSerif"/>        <property name="normal" value="net/sf/jasperreports/fonts/helvetica/Helvetica.ttf"/>        <property name="bold" value="net/sf/jasperreports/fonts/helvetica/HelveticaBold.ttf"/>        <property name="italic" value="net/sf/jasperreports/fonts/helvetica/HelveticaItalic.ttf"/>        <property name="boldItalic" value="net/sf/jasperreports/fonts/helvetica/HelveticaBoldOblique.ttf"/>        <property name="pdfEncoding" value="Identity-H"/>        <property name="pdfEmbedded" value="true"/>        <property name="exportFonts">            <map>                <entry key="net.sf.jasperreports.html">                    <value>'DejaVu Sans', Arial, Helvetica, sans-serif</value>                </entry>                <entry key="net.sf.jasperreports.xhtml">                    <value>'DejaVu Sans', Arial, Helvetica, sans-serif</value>                </entry>            </map>        </property>    </bean>

Having the font extension, the generated report is identical on different machines (Windows, Linux). But then I have another problem:

Although there are still spaces, some texts are not printed/shown completely. Attached is a screenshot of the report. You can see the text  "Saved, Nach I"  which is supposed to be "Saved, Nach IFF".

does this have something to do with missing fonts? Maybe the placeholder for the text is calculated using another font and helvetica just doesn't fit into it? How can I solve this problem?

Thanks a lot for any hints

 

regards

 

Update:

I attached another screenshot: it shows that for the fields, there is somehow an invisible limit for the font width, and the max. number of letters is set to 11 letters, but the text of parameter ("aus anderer VKST") is printed completely, and they have exactly the same attributes. Anyone can explain?

 

 



Post Edited by psentosa at 03/03/2010 07:46



Post Edited by psentosa at 03/03/2010 07:47



Post Edited by psentosa at 03/03/2010 08:39
Link to comment
Share on other sites

  • 4 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hello,

I have your same problem, I have tried both using fontExtensions or installing fonts directcly on the machine 

It seems that JR calculates the height of the textView based on the default font size, and NOT using the custom font I' using there.

Have you found a solutions meantime ?

Thank You

Giorgio

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