On Sep 23, 2005, at 18:32, Andreas L Delmelle wrote:


Now, I was thinking, since currently the fallback values are used as defaults --which, strictly speaking, is wrong-- maybe the first step towards implementing "auto" could be to define these fallbacks in fop.xconf (?)

Duh! I mean, we still have to hard-code it into FOUserAgent, but the intention is to provide the end-user with a way to set defaults himself, so that he can use "auto" and specify different values for the defaults if he wants to. So he can switch from A4 to Letter to A5 just by modifying the height and width values in his own config file, instead of explicitly specifying these in his FO source --although for one FO document, this seems to be no improvement, if you have a hundred you wish to render to A4 instead of Letter, this begins to make sense. Just use "auto" and modify the value once in your custom config.

<snip />
I'll gladly take a look at it, if enough people consider this to be sensible...

So I didn't wait for responses, but I'm a bit stuck ATM, since I'd like to make sure that the user can specify these values in a custom fop.xconf in the same format he would specify them in the FO source. I'd like to take advantage of the property parser here.

More accurately (see thread about indefinite page-dimensions):
As a first step, I'd like to provide a customized PageDimensionMaker, that checks for a specified or initial value of "auto", and then returns a LengthProperty based on those defaults. (In the long term we should also take into account the Rec referring to the 'media information', but for now this should suffice.)

The FOUserAgent is reachable to the Maker through FObj.getFOEventHandler().getUserAgent(), so no problem there, but how to proceed after fetching the String value...

If anyone can offer any hints on this (before I figure it out myself ;-P), these would be much appreciated.


TIA!

Andreas

Reply via email to