Using FOP to transform xml+xslt=xsl-fo= pdf
Previously, we used an external configuration file where fonts were registered and a directory was specified.
Now we decided to completely abandon this file, and configure everything inside the java classes.
In the code, I specified the path to the fonts
foUserAgent.getFontManager().setResourceResolver(resourceResolver);
I output in the logs and get the correct path
FontBaseURL: file:/myserv/etc/tomcat/fop/Fonts/
But I keep getting the error
FOUserAgen Font "Times New Roman,normal,400" not found. Substituting with "any, normal, 400".
How do I need to specify a directory so that fop will automatically load fonts from where?
I understand correctly that I need to use the <auto-detect/> option, but how do I enable it if I don't use an external config file?
Is it really possible to set up work with fonts without using an external configuration file?