0

I have a Problem with Apache FOP 1.0

PDF-Files are created without a problem, but if i try to create a Chinese PDF, all i get is "#" where chinese letters should be. Error is something like

WARN org.apache.fop.events.LoggingEventListener:80 - Glyph "?" (0x6ee4) not available in font "Helvetica".

My .fo looks something like this:

<?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>
 ....

What am i missing out?

Timo Kurowski
  • 45
  • 2
  • 7

2 Answers2

1

Please see the Apache FOP FAQ at http://xmlgraphics.apache.org/fop/faq.html#pdf-characters

Jeremias Märki
  • 1,727
  • 10
  • 10
0

In fact, the font "Helvetica" doesn't support the Chinese characters. You need use a font file such as MS Arial Unicode for unicode characters