hilz wrote:
Thomas: the situation got a little complicated now! This worked perfectly in batik 1.5.1. But in an application i am working on, i use fop 0.20.5, and the batik distribution that comes with it does not have this function: getViewBoxTransform().
A Quick solution would be to use getRenderingTransform which IIRC has the viewBox transform in it in versions of Batik that lack getViewBoxTransform().
When compiling my code, i get the following error: cannot resolve symbol symbol : method getViewBoxTransform () location: class org.apache.batik.swing.JSVGCanvas
I tried to substitue the batik that comes with fop with batik 1.5.1. This enables me to compile and run, and the SVG rendering part works fine, BUT fop does not work anymore! rendering a pdf document gives the following error now:
java.lang.NoSuchMethodError: org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge /BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Co ntext;
how come this method was removed from a newer version of batik ?
Did you check? It wasn't removed. This still leaves the question of why you are getting the exception. This method has been in Batik forever so I suspect the problem is on your end.
whatever happened to backward compatibility?
Batik and FOP have some very deep dependencies so it has been a
real struggle keeping the two working together. That said lately we have managed to keep from breaking each other quite well.
What are my options now?
Figure out why you get the error above.
Is it an option to run the two versions of batik in the same VM?
I wouldn't recommend it. If you want to setup custom class loaders you might pull it off.
when using fop, use the one that came with it, and when doing just SVG stuff, use batik 1.5.1 ?
Well I don't remember what version of Batik is bundled with FOP but it's probably pretty old and a lot of fixes/improvements have gone into Batik since then. I would look at trying to get Batik 1.5.1 to work with FOP. But the path of least resistance would be to simply find/use the equivalent of getViewBoxTransform in the version of Batik in the FOP you are using.
if this is possible, then how can it be done? and if there is better solution, i would greatly appreciate the help.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]