2014-02-20 51 views
0

我与Apache FOP 1.0的Apache FOP缺失字形

的PDF文件有问题没有问题的产生,但如果我尝试创建一个中国的PDF,我得到的是“#”,其中中国信应该是。错误类似于:

WARN org.apache.fop.events.LoggingEventListener:80 - Glyph“?” (0x6ee4)在字体“Helvetica”中不可用。

我.fo看起来是这样的:

<?xml version="1.0" encoding="UTF-8"?> 
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Arial Unicode MS,Verdana,sans-serif"> 
<fo:layout-master-set> 
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="1.5cm" margin-bottom="1.5cm" margin-left="1.5cm" margin-right="1.5cm"> 
    <fo:region-body margin-top="3.2cm" background-color="#F8EC00" /> 
    <fo:region-before background-color="#F8EC00" /> 
    <fo:region-after display-align="after" background-color="#F8EC00" /> 
</fo:simple-page-master> 
</fo:layout-master-set> 
<fo:page-sequence master-reference="simpleA4"> 
<fo:static-content flow-name="xsl-region-before"> 
    <fo:table table-layout="fixed" text-align="left" background-color="#F8EC00" > 
    <fo:table-column column-width="12.6cm"/> 
    <fo:table-column column-width="3.6cm"/> 
    <fo:table-body> 
     <fo:table-row keep-together.within-page="always"> 
      <fo:table-cell padding="0.4cm"> 
      <fo:block text-align="left" font-size="16pt" font-weight="bold" color="#007D4E" > 
      曼牌滤清器 
      </fo:block> 
      <fo:block font-size="18pt" font-weight="bold" color="#007D4E" margin-top="0.5cm"> 
      WK 69 
      </fo:block> 
     </fo:table-cell> 
.... 

我在想什么呢?

回答

0

事实上,字体“黑体”不支持中国汉字。您需要使用字体文件,例如MS Arial Unicode作为Unicode字符