xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Karg" <k...@quipsy.de>
Subject How to configure fonts and baseURL differently for FOP instances?
Date Thu, 13 Jun 2013 08:37:19 GMT
Dear FOP Community,


my XSL-FO templates are using custom fonts and relatively addressed
external graphics. To make embedded FOP 1.1 correctly use these fonts
and images, I am supplying a baseURL and userConfig this way:



  FOP_FACTORY.setBaseURL(stylesheetURL.toExternalForm().replace(" ",
"%20") + "/..");

  FOP_FACTORY.newFop(MIME_PDF, ...);


While this is in fact working pretty well with a single rendering job,
it obviously will become a problem as soon as multiple rendering jobs
using different config and baseURL are issued. So I need to make the
configuration thread-safe in some way, but I do not find the needed
answers in the documentation:


*         Is it enough to synchronize around the above three lines
(hence, will the FOP instance store the userConfig and baseURL), or do I
have to synchronize around the complete rendering job also (hence, will
the FOP instance lookup userConfig and baseURL inside oft he factory at


*         Is there a way to set the configFile and baseURL for a
specific FOP instance, and if not, why not? Both is highly related to
the location and internal references of the stylesheet, so it makes no
sense to have it only static for all rendering jobs.


Thanks a lot!



View raw message