Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XSL-FO Foreign Characters (Polish) Unicode in APACHE FOP (V. 1.1)

I have the following xsl-fo code, attempting to produce foreign characters.

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
...
<fo:block font-size="11pt" font-family="calibri" language="pl">    
Odwrotna strona tego pisma zawiera wa&#x017C;ne informacje.  je&#x017C;eli potrzebuje Pan/i pomocy, aby je zrozumie&#x0107;, prosz&#x0119; 
        zadzwoni&#x0107; pod numer X-XXX-XXX-XXXX po bezp&#x0142;atne us&#x0142;ugi j&#x0119;zykowe.
</fo:block>

I've tried every font-type I can think of to access the required unicode characters, but have had no success so far.

Is there something wrong with my formatting? Or the unicode I'm using? Or perhaps I haven't declared my XML properly?

This, and my Korean, Chinese, and Russian unicode characters are the only ones giving me trouble at the moment. Whereas my Spanish and Croatian unicode characters are working fine.

like image 355
Zibbobz Avatar asked Jul 30 '13 19:07

Zibbobz


1 Answers

If you are having problems displaying special characters in your file you can try defining them in configuration file. Here http://xmlgraphics.apache.org/fop/trunk/output.html#afp-configuration you might find how to do it. Also make sure you have path to your fonts directory correctly specified. In Windows it should look something like that:

<fonts>
      <directory recursive="true">C:\Windows\Fonts</directory>
      <auto-detect/>
</fonts>
like image 137
Michał Krzemiński Avatar answered Oct 14 '22 17:10

Michał Krzemiński