سؤال

I have seen that you can add custom fonts to Apache FOP using the config file as explained here. However, I am not using a local installation of FOP but a maven installation. I can render pdf files correctly, but I don't know how I can define a configuration file through maven.

Is it possible?

هل كانت مفيدة؟

المحلول

I found that you can do this with the following java code:

FopFactory fopFactory = FopFactory.newInstance();
File file = new File("path/to/file/userConfig.xml");
fopFactory.setUserConfig(file);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top