6

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.

mzjn
  • 48,958
  • 13
  • 128
  • 248
Zibbobz
  • 725
  • 1
  • 15
  • 41
  • What is your output file format? Which program do you use to view the resulting output? What exactly happens to the characters (are they left out, wrong character, question mark, box)? Which OS are you on? – Eelke Jul 30 '13 at 20:04
  • My output is a PDF file, viewed with Adobe Reader. The characters in question become # symbols. I am on Windows XP. – Zibbobz Jul 30 '13 at 20:14

1 Answers1

3

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>
Michał Krzemiński
  • 1,261
  • 8
  • 10
  • Given that these files have to be processed on a server, and then sent to a print room for printing, are there any forseeable problems, as far as server-side support? I assume that, in order to render them on our server, I will have to make the directory reference a server directory. But in order to read and print the files, do the fonts need to be installed locally at all? – Zibbobz Aug 01 '13 at 15:02
  • 1
    Font files only need to be present at server-side. Then they are "included" within pdf itself. – Michał Krzemiński Aug 02 '13 at 06:45
  • Is the inclusion of font files in the generated pdf the default in the settings of Apache fop? – z-- Sep 26 '13 at 13:19