Incorect PDF rendering for polish national characters
Single Source Publishing Web-Application
Brought to you by:
manfredp
When I exporting documentation containing polish national characters like ąĄćĆęĘńŃśŚłŁóÓżŻźŹ html export looks fine put pdf export is broken. I see "#" in place od polish characters.
Docmenta can't find this characters in default Helvetica font.
The solution I've found is to externalize fop-config.xml and set font directory and substitutions list to substitute Helvetica to SansSerif.
It is posible to add such configuration is Docmenta to allowset font directory and default PDF font.
My fop-config.xml:
<fop version="1.0"></fop>
<strict-configuration>false</strict-configuration>
<strict-validation>false</strict-validation>
<fonts>
<!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
<directory recursive="true">/usr/local/share/fonts</directory>
<!-- automatically detect operating system installed fonts -->
<auto-detect/>
<substitutions>
<substitution>
<from font-family="Helvetica" font-weight="100..900"/>
<to font-family="SansSerif"/>
</substitution>
<substitution>
<from font-family="Helvetica" font-weight="bold" />
<to font-family="SansSerif" font-weight="bold" />
</substitution>
<substitution>
<from font-family="Helvetica" font-style="italic"/>
<to font-family="SansSerif" font-style="italic"/>
</substitution>
<substitution>
<from font-family="Helvetica" font-style="italic" font-weight="bold"/>
<to font-family="SansSerif" font-style="italic" font-weight="bold"/>
</substitution>
</substitutions>
</fonts>
<renderers>
<renderer mime="application/pdf">
<fonts>
<!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
<directory recursive="true">/usr/local/share/fonts</directory>
<!-- automatically detect operating system installed fonts -->
<auto-detect/>
<substitutions>
<substitution>
<from font-family="Helvetica" font-weight="100..900"/>
<to font-family="SansSerif"/>
</substitution>
<substitution>
<from font-family="Helvetica" font-weight="bold" />
<to font-family="SansSerif" font-weight="bold" />
</substitution>
<substitution>
<from font-family="Helvetica" font-style="italic"/>
<to font-family="SansSerif" font-style="italic"/>
</substitution>
<substitution>
<from font-family="Helvetica" font-style="italic" font-weight="bold"/>
<to font-family="SansSerif" font-style="italic" font-weight="bold"/>
</substitution>
</substitutions>
</fonts>
</renderer>
</renderers>
Since Docmenta version 1.8 this can be set in the application settings. Set the path to the fop-config.xml in the field "Custom FOP configuration File" (see http://www.docmenta.org/onlinedocs/content/app_settings.html).