Due to some special characters in my language, I need to embed font into PDF file. I read a lot of pages about FOP, and I figured out I need configuration file like this:
<?xml version="1.0"?>
<fop>
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="yes" embed-url="file:///C:/windows/fonts/arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
Unfortunatelly, when I run mvn pdf:pdf -X, I see line
[DEBUG] userconfig is null
Which looks like the config is loaded. Where should I put the configuration file and how I can tell the pdf plugin, where to look?
I found out the sollution, but still I am not convinced that it is ideal. I used Exec Maven Plugin and run the fop with the result created from Maven Pdf Plugin. The final solution looks like:
pom.xml
fop.xconf:
fop.xconf is stored in site/resources next to pdf-config.xml and it is copied into target by maven pdf plugin.