我將XSLT轉換爲帶有中文字符的PDF。我正在使用Fonet.dll和csharp。 我已經用控制面板中的地區語言添加了中文,即ZH和ZHT。xslt fo不顯示中文或泰文字體
我下面的代碼示例生成pdf
的XSLT是如下
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<xsl:template match="/" >
<fo:root xml:lang="en"
xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master page-height="350mm"
page-width="271mm"
master-name="PageMaster">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PageMaster">
<fo:flow flow-name="xsl-region-body" >
<fo:block font-family="MingLiU">
hello- 您好
</fo:block>
<fo:block font-family="MS Mincho"
>カニ入りスープなしの麪をください。</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
中國的字符不會出現在所有 我所有設置編碼編碼=「GB2312」但它沒有任何區別。
有沒有一種方法可以在XSLT中嵌入字體,以便中文字符出現。
爲什麼不把編碼爲UTF-8? –
我試過將編碼設置爲UTF-8,但沒有工作 – user1339913
中文字符根本沒有出現 – user1339913