Re: Using FOP / trying to embed FOP
Hi Kevin This is probably a classpath problem (NoClassDefFoundError). You've got to make sure that fop.jar (as well as batik and friends) are on your classpath. Example: java -cp fop.jar;batik.jar;other-jars... embed simple.fo testembed.pdf Look at fop.bat as another example. Don't try to compile FOP from the command line using javac. Use the Ant build script instead and then use the generated fop.jar in your application. Another comment further down... Please be so kind as to ask this sort of question on the fop-user mailing list next time. Thanks and good luck! On 03.01.2003 15:05:00 Kevin.Wood wrote: Trying to embed FOP within Java. I added code that the documentation stated was necessary in order to embed FOP. I compiled the code. I get errors when instantiating the FOP Driver class. I apologize for this be lengthy. ---Executing my java code: My goal is to take one of the sample .fo files (simple.fo) and generate a pdf file. ** Error: ** C:\fop-0.20.5rcjava embed simple.fo testembed.pdf argument1: simple.fo argument2: testembed.pdf Exception in thread main java.lang.NoClassDefFoundError: org/apache/fop/fo/PropertyList at org.apache.fop.apps.Driver.init(Driver.java:178) at org.apache.fop.apps.Driver.init(Driver.java:186) at embed.main(embed.java:60) C:\fop-0.20.5rc - - I can see a PropertyList.java file but no class file. Compiling PropertyList.java gives the following error -- -- C:\org\apache\fop\fojavac PropertyList.java PropertyList.java:11: Class org.apache.fop.fo.properties.WritingMode not found in import. import org.apache.fop.fo.properties.WritingMode; ^ 1 error C:\org\apache\fop\fo -- -- There is only one file (package.html) in the org.apache.fop.fo.properties. This file states the following: Classes representing XSL-FO properties (See ยง7 of the XSL 1.0 Standard). * Questions Problem locating these files...Where do I get them? Are there any steps that I need to do in order to get this to work? What is the purpose for building FOP? Is there anything wrong with my code located below? * My Java code: ** * I had to add a lot of import statements to get the code to compile. import java.util.*; import java.text.*; import org.apache.fop.apps.Driver; import org.xml.sax.InputSource; import org.apache.avalon.framework.logger.ConsoleLogger; import org.apache.avalon.framework.logger.Logger; // FOP import org.apache.fop.fo.*; import org.apache.fop.configuration.Configuration; import org.apache.fop.configuration.ConfigurationReader; import org.apache.fop.fo.ElementMapping; import org.apache.fop.fo.FOTreeBuilder; import org.apache.fop.render.Renderer; //import org.apache.fop.render.pdf.PDFRenderer; import org.apache.fop.tools.DocumentInputSource; import org.apache.fop.tools.DocumentReader; import org.apache.fop.messaging.MessageHandler; // Avalon import org.apache.avalon.framework.logger.ConsoleLogger; import org.apache.avalon.framework.logger.Logger; // DOM import org.w3c.dom.Document; // SAX import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; // Java import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Enumeration; import java.util.HashMap; import java.util.Vector; //import java.io.OutputStream; import java.io.*; //import org.apache.avalon.ramwork.logger.Logger; public class embed { public static void main(String[] args) { try{ System.out.println(argument1: + args[0]); System.out.println(argument2: + args[1]); Driver driver = new Driver (new InputSource (args[0]), new FileOutputStream(args[1])); driver.setRenderer(Driver.RENDER_PDF); driver.run(); Once you're here
Re: Using FOP with xmlspy -- THANKS FOR HELP, QUESTIONANSWERED
Thanks Malcolm Sinclair - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using FOP with xmlspy
I know FOP through XMLSpy doesn't work on NT, I think that may apply to Win98/95 as well. Matt Savino -Original Message- From: Malcolm Sinclair [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Using FOP with xmlspy Please excuse my asking this question on a developer's forum -- I realise it's off-topic. Can you give me some hints, or can you put me in touch with someone who has successfully produced PDFs from .xml files in xmlspy? I have done this quite satisfactorily with fop-0.20.3 from the command line, but not from WITHIN xmlspy. A few details: + I'm using the evaluation version of xmlspy, + I'm in touch with Altova's support people; they are trying to help, but as yet nothing resolved, + I'm a tech writer (novice in XML and no Java knowledge whatsoever) I suspect the root of the problem is my unfamiliarity with XML; however, your suggestions could be very helpful just now Thank you for your time Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using FOP with xmlspy
According to tech support, FOP only works with Win2k - Original Message - From: Savino, Matt C [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 6:11 PM Subject: RE: Using FOP with xmlspy I know FOP through XMLSpy doesn't work on NT, I think that may apply to Win98/95 as well. Matt Savino -Original Message- From: Malcolm Sinclair [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Using FOP with xmlspy Please excuse my asking this question on a developer's forum -- I realise it's off-topic. Can you give me some hints, or can you put me in touch with someone who has successfully produced PDFs from .xml files in xmlspy? I have done this quite satisfactorily with fop-0.20.3 from the command line, but not from WITHIN xmlspy. A few details: + I'm using the evaluation version of xmlspy, + I'm in touch with Altova's support people; they are trying to help, but as yet nothing resolved, + I'm a tech writer (novice in XML and no Java knowledge whatsoever) I suspect the root of the problem is my unfamiliarity with XML; however, your suggestions could be very helpful just now Thank you for your time Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using FOP with xmlspy
Thanks Matt -- since I'm using NT, that's certainly shortened my suffering! Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using FOP with xmlspy
Is that XMLSpy that only works with Win2k? FOP most definitely is NOT limited to Win2k. FOP should work on any platform with full JDK 1.2+ and AWT support. -Original Message- From: Joe Sytniak [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 6:19 PM To: [EMAIL PROTECTED] Subject: Re: Using FOP with xmlspy According to tech support, FOP only works with Win2k - Original Message - From: Savino, Matt C [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 6:11 PM Subject: RE: Using FOP with xmlspy I know FOP through XMLSpy doesn't work on NT, I think that may apply to Win98/95 as well. Matt Savino -Original Message- From: Malcolm Sinclair [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Using FOP with xmlspy Please excuse my asking this question on a developer's forum -- I realise it's off-topic. Can you give me some hints, or can you put me in touch with someone who has successfully produced PDFs from .xml files in xmlspy? I have done this quite satisfactorily with fop-0.20.3 from the command line, but not from WITHIN xmlspy. A few details: + I'm using the evaluation version of xmlspy, + I'm in touch with Altova's support people; they are trying to help, but as yet nothing resolved, + I'm a tech writer (novice in XML and no Java knowledge whatsoever) I suspect the root of the problem is my unfamiliarity with XML; however, your suggestions could be very helpful just now Thank you for your time Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using FOP with xmlspy
No - it is an xmlspy limitation. To me, it appears that they do not support the hook into the java vm with anything but win2k. I too am running NT. FOP from the command line works fine. Cannot call it from xmlspy. - Original Message - From: Art Welch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 6:27 PM Subject: RE: Using FOP with xmlspy Is that XMLSpy that only works with Win2k? FOP most definitely is NOT limited to Win2k. FOP should work on any platform with full JDK 1.2+ and AWT support. -Original Message- From: Joe Sytniak [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 6:19 PM To: [EMAIL PROTECTED] Subject: Re: Using FOP with xmlspy According to tech support, FOP only works with Win2k - Original Message - From: Savino, Matt C [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 6:11 PM Subject: RE: Using FOP with xmlspy I know FOP through XMLSpy doesn't work on NT, I think that may apply to Win98/95 as well. Matt Savino -Original Message- From: Malcolm Sinclair [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Using FOP with xmlspy Please excuse my asking this question on a developer's forum -- I realise it's off-topic. Can you give me some hints, or can you put me in touch with someone who has successfully produced PDFs from .xml files in xmlspy? I have done this quite satisfactorily with fop-0.20.3 from the command line, but not from WITHIN xmlspy. A few details: + I'm using the evaluation version of xmlspy, + I'm in touch with Altova's support people; they are trying to help, but as yet nothing resolved, + I'm a tech writer (novice in XML and no Java knowledge whatsoever) I suspect the root of the problem is my unfamiliarity with XML; however, your suggestions could be very helpful just now Thank you for your time Malcolm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using Fop Within An Application (AWTStarter with some changes)
Hello, Jim! You wrote to FOP Dev [EMAIL PROTECTED] on Fri, 15 Feb 2002 14:15:13 -0600: JU I am trying to use FOP within my application to process and display JU (in AWT mode) a FO I create by processing records from a database. JU I get to the point where I have a String object containing the FO JU but I can't seem to get You know some times ago I did have same problem. And I did some changes in AWTStarter class. I attach this file. Also I am using small library to convert SQL Query to XML file. Seems working fine. How to use: AWTStarter awt = new AWTStarter(); awt.run(new File(xml), new File(xsl)); This starter working with FOP. You shouldn't make any changes in FOP. 2 Developers: If I did brake any License agreements please let me know. I just want to help. --- Yours sincerely, Ivan Latysh. [EMAIL PROTECTED] http://ivan.yourmail.com AWTStarter.java Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using Fop Within An Application (AWTStarter with some changes)
awt.run(new File(xml), new File(xsl)); This line presents a problem for me. I no have files. All I have is a String containing the FO which I received from a call to the server. Tthe server runs xml data retrieved from a database through xslt and returns the output FO to the client for displaying. I need to process the string containing the FO and display the results in a window. Jim -Original Message- From: IvanLatysh [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 3:53 PM To: [EMAIL PROTECTED] Subject: Re: Using Fop Within An Application (AWTStarter with some changes) Hello, Jim! You wrote to FOP Dev [EMAIL PROTECTED] on Fri, 15 Feb 2002 14:15:13 -0600: JU I am trying to use FOP within my application to process and display JU (in AWT mode) a FO I create by processing records from a database. JU I get to the point where I have a String object containing the FO JU but I can't seem to get You know some times ago I did have same problem. And I did some changes in AWTStarter class. I attach this file. Also I am using small library to convert SQL Query to XML file. Seems working fine. How to use: AWTStarter awt = new AWTStarter(); awt.run(new File(xml), new File(xsl)); This starter working with FOP. You shouldn't make any changes in FOP. 2 Developers: If I did brake any License agreements please let me know. I just want to help. --- Yours sincerely, Ivan Latysh. [EMAIL PROTECTED] http://ivan.yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: using fop
Hello, thanks for your answer Keiron. I'm trying using batik but i get the following error message: E:\xml-batikbuild svgrasterizer -d e:/test -m application/pdf e:/boxes.svg Buildfile: build.xml init-args: init: compile: svgrasterizer: [java] Getting class ... [java] Getting class done... [java] Converting file:/e:/boxes.svg to e:\test\boxes.pdf [java] transcode ... [java] java.lang.AbstractMethodError [java] at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) [java] at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:192) [java] at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.writeImage(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) Does anyone know what could cause this error? Converting into png or other formats works. thanks in advance bruno - Original Message - From: Keiron Liddle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 29, 2001 9:02 AM Subject: Re: using fop On 2001.10.27 18:36 Bruno Polder wrote: hi to all i have a question in order to use fop to generate pdf files of my svg's: can anyone tell me how to generate the 'fo-objects-svg-file' from my normal svg-file? it seems that fop can't handel normal svgs but only fo-svgs (is that right?) Fop is used to format and render xsl fo into an output, eg. pdf. Batik is used to rasterize an svg document into and output, eg. png, jpg of pdf. If you have an svg file that you want to convert into a pdf document then you use the batik rasterizer to render to the mime type for pdf application/pdf. Since the rasterizing is actually done by code in fop you will need fop in your class path. You should visit the batik web site if you need any information about how to use the batik rasterizer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: using fop
You are having version compatibale problems. Your best bet is to use the batik library that comes with the version of fop you are using. On 2001.10.29 13:35 Bruno Polder wrote: Hello, thanks for your answer Keiron. I'm trying using batik but i get the following error message: E:\xml-batikbuild svgrasterizer -d e:/test -m application/pdf e:/boxes.svg Buildfile: build.xml init-args: init: compile: svgrasterizer: [java] Getting class ... [java] Getting class done... [java] Converting file:/e:/boxes.svg to e:\test\boxes.pdf [java] transcode ... [java] java.lang.AbstractMethodError [java] at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) [java] at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:192) [java] at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.writeImage(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) Does anyone know what could cause this error? Converting into png or other formats works. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: using fop
On 2001.10.27 18:36 Bruno Polder wrote: hi to all i have a question in order to use fop to generate pdf files of my svg's: can anyone tell me how to generate the 'fo-objects-svg-file' from my normal svg-file? it seems that fop can't handel normal svgs but only fo-svgs (is that right?) Fop is used to format and render xsl fo into an output, eg. pdf. Batik is used to rasterize an svg document into and output, eg. png, jpg of pdf. If you have an svg file that you want to convert into a pdf document then you use the batik rasterizer to render to the mime type for pdf application/pdf. Since the rasterizing is actually done by code in fop you will need fop in your class path. You should visit the batik web site if you need any information about how to use the batik rasterizer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP in WebSphere and some general notes (Was: Re: Using FOP in Servlet)
On Fri, 05 Oct 2001 15:32:10 Shkuro, Yuri wrote: I totally agree with the suggestion to get rid of as much extra libraries as possible. Our infrastructore guys were very perplexed when I told them that I am going to use FOP in my project, and, by the way, I need those five extra jars in the app server class path. I don't know how much avalon framework is integrated into FOP, but with respect to logkit - logging is a simple API, and since FOP already supports pluggable loggers, why not indeed make those loggers API driven, instead of logkit dependent? FOP did not support pluggable loggers properly. There needs to be some logging implementation and having our own, when there are others around, is not the best thing. The important things for logging are - handle threads - inversion of control I was able to use FOP without including jimi.jar, but batik is required even though I don't use SVG. Why is that? Can't it be decoupled somehow and only loaded when SVG is used? As I have said before, yes it can be decoupled. This will require the user agent to be implemented and a few other areas to be improved. The best way to get this done is to help out. There are a large number of things that need to be done and it seems a large number of people who want them done. Helping out is a good way to get these things done. YS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 8:49 AM To: [EMAIL PROTECTED] Subject: FOP in WebSphere and some general notes (Was: Re: Using FOP in Servlet) Karen Lease wrote: Configuration.put(baseDir, SOMEURLSTRING); Thanks. I meanwhile figured it out that i could use SOMEURLSTRING=file:+xslFileName Some other notes on FOP 0.20.2 in general and using in in an IBM WebSphere Server in particular (including problems actually caused by Batik): - IBM has their own Logging mechanism (though it's primitive). Using LogKit is of no real use for me, it just forces me to put logkit.jar in the classpath which noticable increases startup time (invconvenient in development only, but i *am* developing...). Could you use an lightweight interface which belongs to a FOP package, and an default implementation which dispates to an LogKit logger? Something like the ErrorListener class in JAXP. I could then provide my own implementation to the interface without having to pull in the whole LogKit. This would also make for an much better separation of the libraries, there would be just one class in FOP which uses LogKit stuff in the delegation and setup routines. - Something similar goes for the avalon framework. I thought i could avoid putting the jar in the classpath by not using the Driver class, but it still goes in by a remarkably twisted way: somewhere during SVG rendering in Batik a batik.bridge.BridgeContext is created, which quite unnecessarily creates a (Batik) DocumentLoader (there is no document because FOP gets the XML already as SAX event stream), which in turn gets a XML Parser name from the SVGUserAgent supplied by FOP which gets it from the fop.apps.Driver class. While the primary fault is in Batik which should create stuff more lazily (you may forward this complaint!), i don't think the fop.apps.Driver should act both as central repository for configuration settings and be an Avalon loggable at the same time. In fact i'd like to have an interface to FOP which resembles slightly more the XSLT TransformerFactory/ Transformer interfaces, with setting parameters using a Parameters object like Java Mail mixed in. The framework stuff including setting up a LogKit logger and and all that could be build around that. If this catches your curiosity, ask me to write up a more complete specification. - There is a unfortunate problem with Batik and the IBM class loaders. In Websphere, there is an ApplicationServer, a JVM running in its own OS process, which can contain several WebApps. Each WebApp may have its own classpath settings. At first i added batik.jar (and all other jars) to the WebApp specific classpath. Several Batik classes have static class variables which register some stuff in the AWT run time at class load time. If there is more than one WebAbb using Batik, directly or indirectly, the first WebApp has no problems, but the WebApp coming second gets errors roughly like instance NNN of class name exists. I got around this by adding the jars to the ApplicationServer classpath, where they really belong (but this is awkward without permission to mangle the server startup files). Some minor points: - In fop.apps.Driver, the _areaTree variable and related imports and statements appear to be defunct and can probably be deleted. - FOP gets a null pointer exception if there is no default namespace and an element without a namespace prefix slipped into the input
FOP in WebSphere and some general notes (Was: Re: Using FOP in Servlet)
Karen Lease wrote: Configuration.put(baseDir, SOMEURLSTRING); Thanks. I meanwhile figured it out that i could use SOMEURLSTRING=file:+xslFileName Some other notes on FOP 0.20.2 in general and using in in an IBM WebSphere Server in particular (including problems actually caused by Batik): - IBM has their own Logging mechanism (though it's primitive). Using LogKit is of no real use for me, it just forces me to put logkit.jar in the classpath which noticable increases startup time (invconvenient in development only, but i *am* developing...). Could you use an lightweight interface which belongs to a FOP package, and an default implementation which dispates to an LogKit logger? Something like the ErrorListener class in JAXP. I could then provide my own implementation to the interface without having to pull in the whole LogKit. This would also make for an much better separation of the libraries, there would be just one class in FOP which uses LogKit stuff in the delegation and setup routines. - Something similar goes for the avalon framework. I thought i could avoid putting the jar in the classpath by not using the Driver class, but it still goes in by a remarkably twisted way: somewhere during SVG rendering in Batik a batik.bridge.BridgeContext is created, which quite unnecessarily creates a (Batik) DocumentLoader (there is no document because FOP gets the XML already as SAX event stream), which in turn gets a XML Parser name from the SVGUserAgent supplied by FOP which gets it from the fop.apps.Driver class. While the primary fault is in Batik which should create stuff more lazily (you may forward this complaint!), i don't think the fop.apps.Driver should act both as central repository for configuration settings and be an Avalon loggable at the same time. In fact i'd like to have an interface to FOP which resembles slightly more the XSLT TransformerFactory/ Transformer interfaces, with setting parameters using a Parameters object like Java Mail mixed in. The framework stuff including setting up a LogKit logger and and all that could be build around that. If this catches your curiosity, ask me to write up a more complete specification. - There is a unfortunate problem with Batik and the IBM class loaders. In Websphere, there is an ApplicationServer, a JVM running in its own OS process, which can contain several WebApps. Each WebApp may have its own classpath settings. At first i added batik.jar (and all other jars) to the WebApp specific classpath. Several Batik classes have static class variables which register some stuff in the AWT run time at class load time. If there is more than one WebAbb using Batik, directly or indirectly, the first WebApp has no problems, but the WebApp coming second gets errors roughly like instance NNN of class name exists. I got around this by adding the jars to the ApplicationServer classpath, where they really belong (but this is awkward without permission to mangle the server startup files). Some minor points: - In fop.apps.Driver, the _areaTree variable and related imports and statements appear to be defunct and can probably be deleted. - FOP gets a null pointer exception if there is no default namespace and an element without a namespace prefix slipped into the input. This is because in fop/fo/FOTreeBuilder.java Line 218: HashMap table = (HashMap)fobjTable.get(uri); fobjMaker = (FObj.Maker)table.get(localName); table is null. I believe this also happens always if the namespace URI is not recognized. - The PixelToMM factor (0.35277...) is repeated remarkably often in the source. Regards J. Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using FOP in Servlet
Joerg, I think the easiest way to do this is something like this (taken from the Fop task in org/apache/fop/tools/anttasks/Fop.java) Configuration.put(baseDir, SOMEURLSTRING); You may want to do the whole configuration initialization process anyway just to get things like compression and fonts. When running FOP from the command line, most of the configuration work happens in the Options class (org.apache.fop.apps), so you might want to look at that too. Regards, Karen Lease Joerg Pietschmann wrote: Hello, i use FOP in a servlet together with the Saxon XSL processor. I implemented the communication between the processors as a SAX event stream. The following code snippet was developed with FOP 0.20.1, i think with 0.20.2 i could use the Driver again but i don't want to bother with this yet. [SNIP...] The problem i want help about is the exception [ERROR]: Could not set base URL for svg java.net.MalformedURLException: no protocol: at java.net.URL.init(URL.java:473) at java.net.URL.init(URL.java:376) at java.net.URL.init(URL.java:330) at org.apache.fop.svg.SVGElement.layout(SVGElement.java:143) at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignObject.java:198) at org.apache.fop.fo.flow.Block.layout(Block.java:259) Fortunately, the file renders fine, the missing information is aparently not needed. The SVG is defined in the XSL file. How do i set the base URL for the SVG element, just in order to pacifiy the software? Should i use a real file name (for example the name of the XSL file) or is it sufficient to use ? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using FOP 0.19-CVS to create PDF
--- Don Wellington [EMAIL PROTECTED] wrote: Hi Arved- It is with FOP-0.19 not the latest CVS. I am stuck behind a firewall, so CVS is not really an option. I thought that too for some time but using WinCVS I managed to download the CVS version from CVS. You need to tell WinCVS about your firewall proxies. Alex = Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ SF and Computing Book News and Reviews: http://news.diversebooks.com/ Get Your XML T-Shirt t-shirt/ at http://www.inversity.co.uk/ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using FOP 0.19-CVS to create PDF
My firewall does not allow IP tunneling. Without that even WinCVS doesn't help. Don --- Alex McLintock [EMAIL PROTECTED] wrote: --- Don Wellington [EMAIL PROTECTED] wrote: Hi Arved- It is with FOP-0.19 not the latest CVS. I am stuck behind a firewall, so CVS is not really an option. I thought that too for some time but using WinCVS I managed to download the CVS version from CVS. You need to tell WinCVS about your firewall proxies. Alex = Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ SF and Computing Book News and Reviews: http://news.diversebooks.com/ Get Your XML T-Shirt t-shirt/ at http://www.inversity.co.uk/ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]