Again with thanks to Jeremias, I'm successfully sizing the region-before for dynamically generated tables. I'm doing this via and xslt extension function (Xalan style).

The xslt extension calls my sizing function which employs fop-1.0 to generate an IF from the given dom.Node. I notice that during the function's invocation of fop-1.0 that the named fonts are not found and are substituted with "any" in the resultant intermediate format output, with font-size=1000 (!!!!), with log messages like 'Font "Optima-Oblique,normal,700" not found. Substituting with "any,normal,700'. I'm doubly confused because the fo is ultimately processed to pdf by the same fop-1.0.

I have to confess that I'm invoking fop reflectively since we have many versions in play and I need each to have their own classpath. That said the same invocation happens for both the extension and the final processing. Here's part of the where the font path is set:

final Method setFontBaseURLMethod = fopFactoryClass.getMethod("setFontBaseURL", new Class[]{String.class});
            String fontsURL = "file://" + bundlePath + fopHome + "/fonts";
setFontBaseURLMethod.invoke(fopFactory, new Object[]{fontsURL});

I suspect there is some subtle distinction between generating IF and PDF output?

I get good results with this if the caller of my function is processed with fop-1.0. If the caller is processed by fop-0.95 the estimated size is much too large and I mis-size the region. In both cases the IF has 'font-name="any"' so I'm a little surprised it work at all?!

Any pointers on where I've messed up would be greatly appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to