I am using XSLT to transform XML to XSL-FO and then create PDF from it (using Apache FOP). Unfortunately I have HTML encoded letters in XML like:
<TAG>wpływ</TAG>
How can I have Ł
instead of ł
in my output PDF?
I am using XSLT to transform XML to XSL-FO and then create PDF from it (using Apache FOP). Unfortunately I have HTML encoded letters in XML like:
<TAG>wpływ</TAG>
How can I have Ł
instead of ł
in my output PDF?
It seems that configuration of FOP is not properly set. Edit or duplicate the file fop.xconf
that you will find in the conf
folder within your FOP installation directory.
In this file, locate the <renderer mime="application/pdf">
tag. Inside the <fonts>
child tag, add <auto-detect/>
.
You should obtains a <renderer>
configuration like this (I have removed all the commented text):
<renderer mime="application/pdf">
<filterList>
<!-- provides compression using zlib flate (default is on) -->
<value>flate</value>
<!-- encodes binary data into printable ascii characters (default off)
This provides about a 4:5 expansion of data size -->
<!-- <value>ascii-85</value> -->
<!-- encodes binary data with hex representation (default off)
This filter is not recommended as it doubles the data size -->
<!-- <value>ascii-hex</value> -->
</filterList>
<fonts>
<!-- ... lots of commented stuff in here ... -->
<auto-detect/>
</fonts>
</renderer>
Then you should invoke the fop command with the -c
option, e.g.
fop -c path/to/file/fop.xconf myfile.fo myfileout.pdf
And it should work properly (assuming the font face can properly render the specific character).