aude.allouard Posted May 23, 2016 Share Posted May 23, 2016 Hello,I have a problem when I export in PDF format, a report made by Jasper report Studio. The dynamic text which is very long overflows of a cell.My configuration is the following : <frame borderSplitType="NoBorders"><reportElement positionType="Float" x="0" y="312" width="555" height="26" uuid="bb96afb9-23ab-4e41-a40f-5c35ef30a977"><property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.grid.JSSGridBagLayout"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.layout.grid.x" value="0"/><property name="com.jaspersoft.layout.grid.y" value="-1"/><property name="com.jaspersoft.layout.grid.weight.x" value="4.0"/><property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/><property name="com.jaspersoft.layout.grid.rowspan" value="1"/><property name="com.jaspersoft.layout.grid.colspan" value="4"/><property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/><property name="ShowOutOfBoundContent" value="true"/></reportElement><box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0"><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><staticText><reportElement style="Titre" positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="185" height="26" isPrintWhenDetailOverflows="true" forecolor="#FFFFFF" backcolor="#3978BD" uuid="57909dbe-d6d7-4586-a249-5e6e009b6464"><property name="com.jaspersoft.layout.grid.x" value="0"/><property name="com.jaspersoft.layout.grid.y" value="0"/><property name="com.jaspersoft.layout.grid.weight.x" value="1.5"/><property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/><property name="com.jaspersoft.layout.grid.rowspan" value="1"/><property name="com.jaspersoft.layout.grid.colspan" value="1"/><property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Left" verticalAlignment="Middle"><font fontName="SansSerif"/><paragraph leftIndent="4"/></textElement><text><![CDATA[Observations]]></text></staticText><textField isStretchWithOverflow="true"><reportElement style="Texte" positionType="Float" x="185" y="0" width="370" height="26" isPrintWhenDetailOverflows="true" uuid="e8200ef4-8ef0-486c-84dd-e1e6027ccf72"><property name="com.jaspersoft.layout.grid.x" value="-1"/><property name="com.jaspersoft.layout.grid.y" value="-1"/><property name="com.jaspersoft.layout.grid.weight.x" value="3.0"/><property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/><property name="com.jaspersoft.layout.grid.rowspan" value="1"/><property name="com.jaspersoft.layout.grid.colspan" value="3"/><property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/></reportElement><box><topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Left" verticalAlignment="Middle" markup="none"><font fontName="SansSerif"/><paragraph lineSpacing="Single" leftIndent="4" rightIndent="4"/></textElement><textFieldExpression><![CDATA[$F{observations}]]></textFieldExpression></textField></frame> The PDF export results is the following : The text is correctly stretched in vertical way but it overflows in the horizontal way. Moreover, when I change the "left Indent" parameter of the text field from 4 to 0, the text does'nt overflow in horizontal way but the end of the text is missing.Have you already encountered this problem ? Please I need help. Link to comment Share on other sites More sharing options...
aude.allouard Posted May 30, 2016 Author Share Posted May 30, 2016 I solve my problem thanks to this post.http://community.jaspersoft.com/wiki/why-my-text-not-displayed-correctly-pdfThe font that I used was "DejaVu Sans" and this font didn't exist in the JVM. So I create a new font in JasperStudio which also exist in the JVM. 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