Re: ETA on 0.20.2
On Tue, 18 Sep 2001 16:19:50 Michel Lehon wrote: Hi, I just updated my local CVS copy to test a few things, and I cant build it. I get compile error in SVGObj and SVGElement. Is that normal ? Any fix? I think you just need to do a build clean first. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: ETA on 0.20.2
Hummm Hummm... no comment... I need more sleep. Thanks Keiron. Michel. -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 19 September, 2001 11:33 To: [EMAIL PROTECTED] Subject: Re: ETA on 0.20.2 On Tue, 18 Sep 2001 16:19:50 Michel Lehon wrote: Hi, I just updated my local CVS copy to test a few things, and I cant build it. I get compile error in SVGObj and SVGElement. Is that normal ? Any fix? I think you just need to do a build clean first. - 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: Image location
Hi, Some more info on my problem. I've taken a look at FopImageFactory.java to see how it was handling relative path for images It seems like it tries to use the Configuration's baseDir value. My problem is that the path i'd like to use as the base for relative urls is dependent on the request my servlet got (the ServletPath is important), I tried setting the SystemID of the XML input (through the Locator), but that does not change anything. The same technique (setting the systemID works with Xalan to set the relative paths). Any ideas ? Am I clear or is this completly impossible to understand (I have a hard time explaining) ? Thanks. Michel Lehon Outwares -Original Message- From: Michel Lehon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 18 September, 2001 16:33 To: [EMAIL PROTECTED] Subject: Image location Hi, I'm currently trying to figure out where fop is looking for images (but I'd like to know how external resource are located). I'd like to be able to load images with relative paths, however I'm using fop from a servlet (through the Driver class). I'm firing SAX events myself to Fop's ContentHandler. and I'd like the relative path be be taken/derived from the SystemID of the SAXSource. How could I acheive that, or how can I set Fop's basedir at runtime for the relative paths ? Thanks. Michel Lehon. Outwares. -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 18 September, 2001 12:03 To: [EMAIL PROTECTED] Subject: Re: ETA on 0.20.2 We should probably have a 0.21 release sometime in the next two weeks. Things that will need doing are: - testing for any unnoticed problems - building and putting the release on the server - update the website to reflect the new version - changes list, todo list, status etc. We could have a hold on new features or major changes for a few days and then when everything is done it will be available. So who is going to help out? On Mon, 17 Sep 2001 13:35:28 [EMAIL PROTECTED] wrote: Any ETA on 0.20.2? I really need markers to implement running headers. Thanks, Lou - 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]
FOP + Cocoon + xalan
Hi, I have been doing some testing using barcode samples provided by www.renderx.com I can reproduce correct behaviour by running FOP from command line using fop.bat with latest CVS code However when I use cocoon to run same samples the barcode does not appear properly (only first bar) I have apparently traced this to a mismatch of xalan versions - the FOP cvs uses xalan2.0.0 whereas the Cocoon uses xalan2.2.0-dev If I change classpath in fop.bat to pick up newer version of xalan I can reproduce the problem behaviour Does anyone know if fop group would intend to integrate with later version of xalan? - it would help me immensely Thanks Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[PATCH] Enhanced FOP Ant Task
Hi there I've done some tinkering with the FOP Ant Task, that I'd like to submit. Currently the FOP task can only generate PDF. I changed it so it can use the other renderers as well. Old syntax: fop fofile=myfile.fo pdffile=myfile.pdf/ New syntax: fop fofile=myfile.fo outfile=myfile.pdf/ or fop fofile=myfile.fo renderer=ps outfile=myfile.ps/ The renderer attribute is optional and defaults to pdf. Possible values currently are: ps, mif, pcl, txt and at (AreaTree XML). Attached you find the diff for the Ant Task along with the various updated build.xml files. By the way: It seems that the xml-docs cannot currently be built. I get an infinite number of after page 20. I didn't investigate any further. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029 Internet http://www.outline.ch FOPTask.diff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: [PATCH] Enhanced FOP Ant Task
Sure, good idea. I'm going to do that on Friday and repost the patch. So the changes will be (if I got everything right): pdf -- application/pdf ps -- application/postscript mif -- application/vnd.mif pcl -- application/vnd.hp-PCL txt -- text/plain at -- text/xml On Wed, 19 Sep 2001 14:59:24 +0200 Keiron Liddle wrote: Would it be possible/suitable to define the output type using a mime type. ie. application/pdf rather than having our own definition. On Wed, 19 Sep 2001 14:24:41 Jeremias Maerki wrote: Hi there I've done some tinkering with the FOP Ant Task, that I'd like to submit. Currently the FOP task can only generate PDF. I changed it so it can use the other renderers as well. Old syntax: fop fofile=myfile.fo pdffile=myfile.pdf/ New syntax: fop fofile=myfile.fo outfile=myfile.pdf/ or fop fofile=myfile.fo renderer=ps outfile=myfile.ps/ The renderer attribute is optional and defaults to pdf. Possible values currently are: ps, mif, pcl, txt and at (AreaTree XML). Attached you find the diff for the Ant Task along with the various updated build.xml files. By the way: It seems that the xml-docs cannot currently be built. I get an infinite number of after page 20. I didn't investigate any further. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Freundliche Grüsse OUTLINE AG Jeremias Märki mailto:[EMAIL PROTECTED] Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [PATCH] Enhanced FOP Ant Task
Better yet, could it work on a fileset of fo files and use the mime type for the . extension? -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 19 September 2001 2:27 pm To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PATCH] Enhanced FOP Ant Task Sure, good idea. I'm going to do that on Friday and repost the patch. So the changes will be (if I got everything right): pdf -- application/pdf ps -- application/postscript mif -- application/vnd.mif pcl -- application/vnd.hp-PCL txt -- text/plain at -- text/xml On Wed, 19 Sep 2001 14:59:24 +0200 Keiron Liddle wrote: Would it be possible/suitable to define the output type using a mime type. ie. application/pdf rather than having our own definition. On Wed, 19 Sep 2001 14:24:41 Jeremias Maerki wrote: Hi there I've done some tinkering with the FOP Ant Task, that I'd like to submit. Currently the FOP task can only generate PDF. I changed it so it can use the other renderers as well. Old syntax: fop fofile=myfile.fo pdffile=myfile.pdf/ New syntax: fop fofile=myfile.fo outfile=myfile.pdf/ or fop fofile=myfile.fo renderer=ps outfile=myfile.ps/ The renderer attribute is optional and defaults to pdf. Possible values currently are: ps, mif, pcl, txt and at (AreaTree XML). Attached you find the diff for the Ant Task along with the various updated build.xml files. By the way: It seems that the xml-docs cannot currently be built. I get an infinite number of after page 20. I didn't investigate any further. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Freundliche Grüsse OUTLINE AG Jeremias Märki mailto:[EMAIL PROTECTED] Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Formatting in addiction to the total page number
Hi, perhaps someone have a response to my problem: On top of the first page I would like to make a warning output (e.g. This document contains 10 pages!), but only if the document has more than one page. If the document has exactly one page, no warning should appear. Is this possible ? I have try something like this: xsl:param name=PAGESfo:page-number-citation ref-id=end-of-document//xsl:param xsl:if test=$PAGES1 !-- or xsl:if test=$PAGES gt; 1 , but no more success -- fo:block This document contains fo:page-number-citation ref-id=end-of-document/ pages! /fo:block /xsl:if [... ] fo:block id=end-of-document / but this does't work. Greetings Viktor Keimes - This message is intended for the addressee or its representative only. Any form of unauthorized use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail message and its contents, please notify the sender immediately and delete this message and all its attachments subsequently. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
comparison of XML formatting tools
Hi all, I'd like to get back to the recent discussion about different XML formatters. To evaluate which formatter would best fit my needs, I gathered the most important properties and set up tests for them. Maybe it's intereresting for others as well. The tests were ran through * FOP with the PDF renderer, * FOP with the awt renderer and * Antenna House. I used FOP 0.20.1, CVS version of (that horrible and sad day!) 11th September (xml-fop_20010911041555.tar.gz). The attached table shows my results. An 'X 'indicates that the property works, a '?' stands for 'not tested' and an empty cell means 'property is not supported or not functioning properly'. As I see it, FOP works at least as well as Antenna House; in addition FOP has the (IMHO) essential ability to change page formats among pages. - Corinna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Formatting in addiction to the total page number
This is possible with a bit of inovation. Thanks to the support of markers and svg. The only problem is that the message will appear on all pages except the last page, unless someone knows how to solve this. The idea is to put the message in the static area and also have a marker that is placed in the same position as the message. The marker contents simply has an svg rect that is white so it hides the message. Find the examples below. Also note that I noticed a bug with the markers, the first problem is that it doesn't like it if there is white space before the marker (so it thinks it is not the first child in the block) and the second problem is that an npe results from the first error due to the log being null, my fault. -- ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=1.5cm margin-left=1.5cm margin-bottom=2cm margin-top=1cm page-width=21cm page-height=29.7cm master-name=first fo:region-before extent=1cm/ fo:region-body margin-top=1cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-name=first fo:static-content flow-name=xsl-region-before fo:block-container height=1cm width=15cm top=0cm left=0cm position=absolute fo:block WARNING THIS IS NOT THE LAST PAGE fo:page-number-citation ref-id=end-of-document/ /fo:block /fo:block-container fo:block-container height=1cm width=15cm top=0cm left=0cm position=absolute fo:block fo:retrieve-marker retrieve-class-name=term retrieve-boundary=page retrieve-position=last-ending-within-page/ /fo:block /fo:block-container /fo:static-content fo:static-content flow-name=xsl-region-after fo:block text-align=start font-size=10pt font-family=serif line-height=1em + 2pt Page (fo:page-number/ / fo:page-number-citation ref-id=end-of-document/) /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block text-align=start font-size=12pt font-family=sans-serif flow stuff /fo:block fo:block id=end-of-documentfo:marker marker-class-name=term fo:instream-foreign-object svg xmlns=http://www.w3.org/2000/svg; width=15cm height=1cm xml:space=preserve rect style=fill:white;stroke:white x=0 y=0 width=15cm height=1cm/ /svg /fo:instream-foreign-object /fo:marker /fo:block /fo:flow /fo:page-sequence /fo:root add this after first block in flow to get two pages fo:block break-before=page text-align=start font-size=12pt font-family=sans-serif flow stuff /fo:block On Wed, 19 Sep 2001 15:51:20 [EMAIL PROTECTED] wrote: Hi, perhaps someone have a response to my problem: On top of the first page I would like to make a warning output (e.g. This document contains 10 pages!), but only if the document has more than one page. If the document has exactly one page, no warning should appear. Is this possible ? I have try something like this: xsl:param name=PAGESfo:page-number-citation ref-id=end-of-document//xsl:param xsl:if test=$PAGES1 !-- or xsl:if test=$PAGES gt; 1 , but no more success -- fo:block This document contains fo:page-number-citation ref-id=end-of-document/ pages! /fo:block /xsl:if [... ] fo:block id=end-of-document / but this does't work. Greetings Viktor Keimes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP on IBM AS400
I'm also having some image problems on the AS400. I'm using FOP version 0.18 and Java 1.2. I'm getting the following output when I try to write out the pdf. Pages without images turn out great. Any help or suggestions on this would be greatly appreciated. building formatting object tree setting up fonts formatting FOs into areas [1] [2] [3] rendering areas to PDF writing out PDF Error in XObject : Error while loading image file:/home/directory/img/filename.gif : class java.lang.Exception - Image error Also, I can't figure out how to get FOP to run in Quiet mode when called in java. I'm extending org.apache.fop.apps.Driver and fireing sax events on DefaultHandler (FOTreeBuilder). Can org.apache.fop.apps.Driver say quiet to the backseat chatter? Thanks, JohnPT PS: got the OMR marks working. fop-dev-return-10324-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/17/01 03:23 AM Subject: Re: FOP on IBM AS400 Please respond to fop-dev On Fri, 14 Sep 2001 12:30:09 Stephen Fry wrote: Hi We are attempting to port our application which uses fop 0.20.1 to the AS400. We seems to have some issues with FOP's use of AWT classes. Has anyone any experience of this environment ? Is it possible to configure FOP not to use AWT or is it fundemental ? We have bmp files as external-graphic's, and we are rendering to PDF,PS and PCL. The AWT classes are used by batik and currently batik is tied into fop. If someone implements the user agent properly then it will be possible to separate the use of batik and handle problems better. I don't know what your problem with the AWT classes is but if it is due to the display then the real problem is with java, this is fixed in version jdk1.4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Does render(dom) actually work?
Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:83) at FOtoPDF.main(FOtoPDF.java:24) Here is the source I'm using under v.0.20.1: org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); driver.setupDefaultMappings() ; driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addElementMapping(org.apache.fop.extensions.ExtensionElementMapping ); driver.render(dom); I have tried it with and without any of the mapping methods. I am building the Dom object from a file. The sax input handler created from the same file works fine in render(parser, inputSource). I have read through the dev archives and found a few suggestions but none helped. Is there some configuration I'm missing? Or did this break a long time ago as someone suggested in the archives? I am hoping to use FOP in a major production app, but if I can't solve this I may not be able to. I am currently receiving a DOM object (a small report) from some database access classes. I then perform an XSLT transform which outputs my FO input as another DOM object. I suppose I could pipe the output of that to SAX? I'd really rather not have to do anything klugy like serialize it to a stream and then feed it in as SAX. But I'll consider anything that doesn't cause too much of a performace hit. We definitely don't want to have temp files sitting around, for a host of reasons. Thank you very much for your help. Matt Savino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Compressing Input Document
Group, I am wondering if there is a way to compress the XSL-FO document passed to FOP. We have been experimenting with FOP via Cocoon, Cocoon2, and standalone. One tact was to use JDOM to create a DOM XSL-FO tree passed to FOP. The data passed to FOP seems pretty excessive and will not scale to our needs. We saw about a 35X increase from input to carefully crafted XSL-FO document. There may still be some opportunity for us to trim this down, but table formatting seems to use up a lot of space. Is there a way to compress the XSL-FO object down to a reasonable size? The data itself appears to be very redundant. Thanks, David Morris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Does render(dom) actually work?
Matt, Why don't you do it all in one pass? I have a servlet, that calls some bean to get XML document in a DOM format (actually JDOM), then registers fop driver as receiver of SAX events and runs XSLT on the JDOM tree. // 1. Generate XML tree Document xmlSummary = DataLoader.getSummary(); // 2. Get stylesheet transformer Transformer transformer = transformerFactory.getTransformer( xsl-file ); // 3. Create FOP driver and set rendering mode and output stream org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream( out ); // 4. Create SAXResult based on FOP Driver content handler which will accept // SAX events and build FOP tree javax.xml.transform.sax.SAXResult saxResult = new javax.xml.transform.sax.SAXResult( driver.getContentHandler() ); // 5. Use the Transformer to transform an XML Source and send the output // to a Result object. // Implicitely it will create the FOP tree by firing SAX events transformer.transform( new org.jdom.transform.JDOMSource( xml ), saxResult ); YS -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:33 PM To: '[EMAIL PROTECTED]' Subject: Does render(dom) actually work? Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:83) at FOtoPDF.main(FOtoPDF.java:24) Here is the source I'm using under v.0.20.1: org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); driver.setupDefaultMappings() ; driver.addElementMapping(org.apache.fop.fo.StandardElementMapping); driver.addElementMapping(org.apache.fop.svg.SVGElementMapping); driver.addElementMapping(org.apache.fop.extensions.ExtensionElementMapping ); driver.render(dom); I have tried it with and without any of the mapping methods. I am building the Dom object from a file. The sax input handler created from the same file works fine in render(parser, inputSource). I have read through the dev archives and found a few suggestions but none helped. Is there some configuration I'm missing? Or did this break a long time ago as someone suggested in the archives? I am hoping to use FOP in a major production app, but if I can't solve this I may not be able to. I am currently receiving a DOM object (a small report) from some database access classes. I then perform an XSLT transform which outputs my FO input as another DOM object. I suppose I could pipe the output of that to SAX? I'd really rather not have to do anything klugy like serialize it to a stream and then feed it in as SAX. But I'll consider anything that doesn't cause too much of a performace hit. We definitely don't want to have temp files sitting around, for a host of reasons. Thank you very much for your help. Matt Savino - 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: ETA on 0.20.2
Hi Keiron, I'll fix the bug 3531 (column-number attribute not working on table-column) before the release unless you're already working on it. Also willing to give a hand with updating the website. Regards, Karen PS. I'm working away on LayoutManager ideas and hope to contribute something before or on the coming weekend. Keiron Liddle wrote: We should probably have a 0.21 release sometime in the next two weeks. Things that will need doing are: - testing for any unnoticed problems - building and putting the release on the server - update the website to reflect the new version - changes list, todo list, status etc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 3531] - fo:table-column column-number attribute does not work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3531. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3531 fo:table-column column-number attribute does not work [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Does render(dom) actually work?
Yuri, thanks for your help. I tried your solution and I still get the following error: building formatting object tree building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167) at org.apache.xalan.transformer.QueuedStartDocument.flush(QueuedStartDocument.j ava:108) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle r.java:758) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:245) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle r.java:209) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java: 704) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) It looks very similar to the one before to me. Has anyone tried this with v.0.20.1 yet? Should it say building formatting object tree twice? I'm wondering if this is some kind of issue with namespaces and the DOM2 implementation. Anyone have any ideas? By the way, if I use a DOMResult instead of a SAXResult I get no error. I then serialized the DOMResult to a file and FO works fine with that file as an input. Thanks, Matt -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Matt, Why don't you do it all in one pass? I have a servlet, that calls some bean to get XML document in a DOM format (actually JDOM), then registers fop driver as receiver of SAX events and runs XSLT on the JDOM tree. // 1. Generate XML tree Document xmlSummary = DataLoader.getSummary(); // 2. Get stylesheet transformer Transformer transformer = transformerFactory.getTransformer( xsl-file ); // 3. Create FOP driver and set rendering mode and output stream org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream( out ); // 4. Create SAXResult based on FOP Driver content handler which will accept // SAX events and build FOP tree javax.xml.transform.sax.SAXResult saxResult = new javax.xml.transform.sax.SAXResult( driver.getContentHandler() ); // 5. Use the Transformer to transform an XML Source and send the output // to a Result object. // Implicitely it will create the FOP tree by firing SAX events transformer.transform( new org.jdom.transform.JDOMSource( xml ), saxResult ); YS -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:33 PM To: '[EMAIL PROTECTED]' Subject: Does render(dom) actually work? Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at FOtoPDF.applyFop(FOtoPDF.java:83) at FOtoPDF.main(FOtoPDF.java:24) Here is the source I'm using under v.0.20.1: org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF); driver.setOutputStream(new FileOutputStream(pdfFilename)); driver.setupDefaultMappings() ;
Continued on Page ...
Does any one know how I can generate a Continued on Page 2 message on the bottom of Page 1 and so on throughout a document. I have looked at markers, but can't see how I can use them for this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Does render(dom) actually work?
Hi Savino, Make sure there are NO nulls making their way into the text nodes of your xml stream. these would not give problems if u wrote the xml to a file first suhail -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 3:59 AM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Yuri, thanks for your help. I tried your solution and I still get the following error: building formatting object tree building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm pl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:167) at org.apache.xalan.transformer.QueuedStartDocument.flush(QueuedStartDocume nt.j ava:108) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHa ndle r.java:758) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHa ndle r.java:245) at org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHa ndle r.java:209) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j ava: 704) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans form erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans form erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transfo rmer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm pl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava: 479) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j ava: 1118) at FOtoPDF.applyFop(FOtoPDF.java:127) at FOtoPDF.main(FOtoPDF.java:40) It looks very similar to the one before to me. Has anyone tried this with v.0.20.1 yet? Should it say building formatting object tree twice? I'm wondering if this is some kind of issue with namespaces and the DOM2 implementation. Anyone have any ideas? By the way, if I use a DOMResult instead of a SAXResult I get no error. I then serialized the DOMResult to a file and FO works fine with that file as an input. Thanks, Matt -Original Message- From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 2:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Does render(dom) actually work? Matt, Why don't you do it all in one pass? I have a servlet, that calls some bean to get XML document in a DOM format (actually JDOM), then registers fop driver as receiver of SAX events and runs XSLT on the JDOM tree. // 1. Generate XML tree Document xmlSummary = DataLoader.getSummary(); // 2. Get stylesheet transformer Transformer transformer = transformerFactory.getTransformer( xsl-file ); // 3. Create FOP driver and set rendering mode and output stream org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver(); driver.setRenderer(driver.RENDER_PDF); driver.setOutputStream( out ); // 4. Create SAXResult based on FOP Driver content handler which will accept // SAX events and build FOP tree javax.xml.transform.sax.SAXResult saxResult = new javax.xml.transform.sax.SAXResult( driver.getContentHandler() ); // 5. Use the Transformer to transform an XML Source and send the output // to a Result object. // Implicitely it will create the FOP tree by firing SAX events transformer.transform( new org.jdom.transform.JDOMSource( xml ), saxResult ); YS -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:33 PM To: '[EMAIL PROTECTED]' Subject: Does render(dom) actually work? Hello everyone. By any chance can someone point me to some example code which uses render(dom)? No matter what combination of driver methods or Fop versions (.17,.19,.20.1) I use I seem to get the same error: building formatting object tree setting up fonts java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:320) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191) at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444) at org.apache.fop.apps.Driver.render(Driver.java:449) at
Re: Formatting in addiction to the total page number
On Wed, 19 Sep 2001 17:31:43 Keiron Liddle wrote: This is possible with a bit of inovation. Thanks to the support of markers and svg. The only problem is that the message will appear on all pages except the last page, unless someone knows how to solve this. Sorry about the double message. I have the answer to my problem. The solution (of course) is to use a marker at the top of the flow for the warning message with retrieve-position=first-starting-within-page. So that if the start and end of the flow are on the same page then you see no message. If the end is on a different page then you see the message only on the first page. At least that is one way to do it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]