Jump to content

alexsvecencu

Members
  • Posts

    3
  • Joined

  • Last visited

alexsvecencu's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Most likely you are right and something is wrong in the way the font is loaded/available space is calculated for rendering the text. I haven't managed to isolate where the issue is coming from but I have found a workaround. My textfields are specified to use html markup so what I have done is added a <br> to the end of each expression. For example: <textFieldExpression><![CDATA[$F{sample.text}+"<br>"]]></textFieldExpression>. This forces the last line to appear for all the tests I've ran. Hope this proves useful for others having the same issue.
  2. Updated jasperreports dependency to 6.2.1 and the behavior is the same. Changing the height of text area won't help (isStretchWithOverflow is set on that textfield anyway) and using a different font or decreasing the font size is not an option as these are the requirements for the report I am creating... My real issue is actually reducing the line spacing. I need to fit a pretty large amount of text in a limited space (I have some text fields that need to fit exactly in one page and they must stretch depending on the content). The requirement is to reduce the line spacing as much as possible so I am using the proportional option with 0.5. I've tried using Fixed, but anything below lineSpacingSize 9 for fixed will cause the problem again. Is there anything I am doing wrong related to this?
  3. Hello, I am generating a PDF report with jasper reports version 6.1.0 from my web app. The last line of the text field is always truncated. After doing some research on the site I have done the following: added a font extension (it is correctly loaded, no errors are thrown, changes are visible when adding the font extension to the classpath and I have even debbuged SimpleFontExtensionsRegistryFactory , to see that my font is correctly loaded)added pdf force linebreak policy in the jrxmlviewing the report in JasperViewer shows the report as I expect (see attached image)viewing the generated pdf removes the last line of the text field (see attached image)It seems to me that this is only happening when I add the lineSpacing attribute to the text field (important feature for the report I am working on). Could someone please point me in the right direction to solving this issue? Thank you, <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version last--> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sampleTemplate" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5929a4e7-a04a-4e0d-b08e-708460b659c6"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/> <field name="sample.text" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <detail> <band height="428" splitType="Stretch"> <textField isStretchWithOverflow="true"> <reportElement key="" positionType="Float" x="-20" y="0" width="595" height="30" uuid="2ca259b2-50de-4ae1-ac2e-4bfbd7824305"/> <textElement markup="html"> <font fontName="Arial Unicode MS" size="11" isPdfEmbedded="true"/> <paragraph lineSpacing="Proportional" lineSpacingSize="0.5"/> </textElement> <textFieldExpression><![CDATA[$F{sample.text}]]></textFieldExpression> </textField> <staticText> <reportElement positionType="Float" x="-20" y="30" width="595" height="20" uuid="2a9ee89c-e1a0-48e8-91ee-4a3dcdc9699b"/> <textElement textAlignment="Center"> <font fontName="Arial Unicode MS" size="11"/> </textElement> <text><![CDATA[EMPTY TEXT FIELD]]></text> </staticText> </band> </detail> </jasperReport> <?xml version="1.0" encoding="UTF-8"?>
×
×
  • Create New...