I've addressed your concern and deprecated the use of PDFEncryptionParams in FOUserAgent (D15). The encryption parameters can now be set through the already existing RendererOptions Map on FOUserAgent. The parameters can either be set separately or as PDFEncryptionParams (I prefer to use the latter).
If anyone has time to implement the generic renderer options to the CLI, he/she is welcome to do that. You proposed using a Properties object. The problem I see here is that non-String values cannot be used whereas with the existing renderer options Map this is possible. Using a Map can be particularly useful in cases where you need to pass, for example, a ContentHandler or a PrinterJob object to the renderer. Obviously, some of the renderers will still need to be extended to allow for such things but the way is free and I already see the need for that. It is nicer/cleaner to use the renderer options instead of having to instantiate and setting up the Renderer yourself for particular situations. Fetching parameter values from the configuration file is also already solved by the configure() methods in the Renderers. These methods just need to be extended to retrieve the desired values. On 15.02.2006 10:37:10 Jeremias Maerki wrote: > Ah, from that perspective, it makes sense. Thanks for taking the time to > explain. I agree that having renderer-dependent settings/objects in the > user agent is actually not the best idea. I will see what I can do about > that and report back later. > > On 14.02.2006 21:15:50 J.Pietschmann wrote: > > Sorry for the delay. > > > > Jeremias Maerki wrote: > > > Do you mean something like setOutputProperty(name, value) in the JAXP > > > Transformer? > > > > No, rather something like setParam(name,value), but on the renderer. > > > > > Note that PDF encryption parameters are specific to a rendering run > > > while the character encoding is probably more of a > > > environmental/factory-level config value. > > > > After some thinking, I'd say I mean a mechanism for setting or > > overwriting configuration values from the command line. > > Something like > > fop -fo foo.fo -pdf foo.pdf -r noprint=yes -r filters='' > > (oops, convoluted example), and the name/value pairs after the -r > > switch would be passed to the renderer by whatever means, for example > > by mangling the configuration or, as I tried to suggest, as a Properties > > object. > > > > I'm bothered with having a very renderer specific data class in the > > UserAgent, and no obvious way to pass command line values to the > > renderer. > > BTW: encryption options like noprint should as well be configurable, > > and there are arguments that even the user password for encryption > > could benefit from being read from the XML configuration data. > > > > J.Pietschmann > > > > Jeremias Maerki Jeremias Maerki