【发布时间】:2017-12-04 10:48:57
【问题描述】:
我使用 iReport 5.6.0 来构建报告。我在静态字段中使用了 SolaimanLipi 字体。 iReport 内部视图没问题,但保存为 pdf 后(在 pdf 阅读器或任何浏览器中打开)bangla 字体无法正确显示。
jrxml代码:
<?xml version="1.0" encoding="UTF-8"?>
<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="challanReport" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="770" leftMargin="54" rightMargin="18" topMargin="20" bottomMargin="20" uuid="9126e000-dc70-4a76-9013-4a4fa290f0df">
<pageHeader>
<band height="273" splitType="Stretch">
<staticText>
<reportElement x="13" y="10" width="403" height="20" uuid="1d2c7070-63f4-4a43-b3a2-63dc4c27c6f2"/>
<textElement>
<font fontName="SolaimanLipi" pdfEncoding="Identity-H"/>
</textElement>
<text><![CDATA[বাংলাদেশ ব্যাংক/সোনালী ব্যাংকের ....ঢাকা....জেলার....মহাখালী....শাখায় টাকা জমা দেওয়ার চালান ।]]></text>
</staticText>
<staticText>
<reportElement x="429" y="10" width="69" height="20" uuid="21401d70-386e-4f01-bf34-586d58991b62"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font fontName="SolaimanLipi" pdfFontName="Helvetica" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[১ম(মূল)কপি]]></text>
</staticText>
<staticText>
<reportElement x="13" y="50" width="512" height="60" uuid="ee6769a0-b25e-4f60-b783-58b535f955d7"/>
<box leftPadding="4">
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement>
<font fontName="SolaimanLipi" pdfEncoding="Identity-H"/>
</textElement>
<text><![CDATA[বিভাগের নাম এবং চালানের পৃষ্ঠাংকনকারী কর্মকর্তার নাম, পদবী ও দপ্তর l *]]></text>
</staticText>
<staticText>
<reportElement x="13" y="30" width="512" height="20" uuid="1e86fa4b-88a3-4e05-b37a-3a4dbd0b2963"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font fontName="SolaimanLipi" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[জমা প্রদানকারী কর্তৃক পূরণ করিতে হইবে |]]></text>
</staticText>
</band>
</pageHeader>
【问题讨论】:
-
你在使用字体扩展吗?
-
@AlexK 没有。我使用了 Identity-H(横向书写的 Unicode)和 pdf 嵌入 true
-
@Rafiq,你找到解决方案了吗?我面临同样的问题..
标签: jasper-reports export-to-pdf