cvs commit: xml-fop/lib buildtools.jar
keiron 01/07/05 23:58:01 Modified:.build.xml docs/xml-docs/fop testing.xml src/org/apache/fop/tools/anttasks RunTest.java lib buildtools.jar Log: added support for easily using w3c testsuite for build target test Revision ChangesPath 1.36 +15 -1 xml-fop/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/build.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- build.xml 2001/05/18 09:55:30 1.35 +++ build.xml 2001/07/06 06:57:51 1.36 @@ -572,8 +572,22 @@ target name=test depends=package echo message=Testing build in jar file ${build.dir}/${name}.jar against reference/ -runTest testSuite=basictests.xml basedir=test/ reference=reference/fop.jar +runTest testSuite=basictests.xml basedir=test/ reference=test/reference/fop.jar refVersion=FOP 0.19.0-CVS/ +runTest testSuite=bugtests.xml basedir=test/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +!-- +runTest testSuite=testsuite.xml basedir=TestSuite/NIST/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +runTest testSuite=testsuite.xml basedir=TestSuite/contrib/IBM/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +runTest testSuite=testsuite.xml basedir=TestSuite/contrib/FOP/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +runTest testSuite=testsuite.xml basedir=TestSuite/contrib/XEP/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +runTest testSuite=testsuite.xml basedir=TestSuite/contrib/XSLFormatter/ reference=test/reference/fop.jar + refVersion=FOP 0.19.0-CVS/ +-- /target target name=all depends=package/ !-- all target for us Makefile converts ;-) -- 1.2 +10 -0 xml-fop/docs/xml-docs/fop/testing.xml Index: testing.xml === RCS file: /home/cvs/xml-fop/docs/xml-docs/fop/testing.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- testing.xml 2001/06/06 12:34:09 1.1 +++ testing.xml 2001/07/06 06:57:55 1.2 @@ -20,6 +20,16 @@ /p /s2 + s2 title=W3C TestSuite +p +The testing is set up so that you can download the testsuite from +jump href=http://www.w3.org/Style/XSL/TestSuite/;http://www.w3.org/Style/XSL/TestSuite//jump, +unzip the file into the base directory of FOP. +Then you can uncomment the lines in the build.xml file in the test target and it +will run through all the tests in the testsuite distribution. +/p + /s2 + s2 title=Writing a Test p A test belongs to one of a few catagories. A basic test should excercise one 1.4 +1 -1 xml-fop/src/org/apache/fop/tools/anttasks/RunTest.java Index: RunTest.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/RunTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RunTest.java 2001/06/18 11:33:33 1.3 +++ RunTest.java 2001/07/06 06:57:57 1.4 @@ -114,7 +114,7 @@ //} else { try { ClassLoader loader = new URLClassLoader( - new URL[]{new URL(file: + basedir + referenceJar)}); + new URL[]{new URL(file: + referenceJar)}); boolean failed = false; try { 1.8 +204 -166 xml-fop/lib/buildtools.jar Binary file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with embedding fop
Hi all, I've tryed to embed FOP-0.18.1DEV with a servlet so that to render (xml,xsl) files into PDF. I am using Tomcat 3.2.1 as web container. Unfortunately, the call of the servlet works from Netscape Navigator and renders PDF. However, it doesn't work from Internet Explorer. in fact with IE, the process ends with a black page in the browser despite the well processing in Tomcat console ( all debuging info which are displayed with the netscape call are displayed too with IE call) you will find attached the servlet code, the xml, xsl file and the html file which allow to call the servlet. please help, Sincerly, adel ___ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/ PDFGeneratorServlet.java Title: Afficher PDF This is my first page To vew PDF, try this link ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; !---- !-- Root Element Template -- !-- This template specifies what creates the root element of the -- !-- result tree. In this case, it tells the XSL processor to -- !-- start with the letter element. -- !---- xsl:template match=/ xsl:apply-templates select=content/ /xsl:template !---- !-- letter template -- !-- This template takes the letter element and processes its -- !-- contents. -- !---- xsl:template match=/ xsl:apply-templates select=page/ /xsl:template xsl:template match=page !---- !-- Cocoon processing instruction -- !-- This processing instruction lets us serve an XML document as a -- !-- PDF. The Cocoon servlet uses this instruction to invoke FOP -- !-- automatically. -- !---- xsl:processing-instruction name=cocoon-formattype=text/xslfo/xsl:processing-instruction !---- !-- The fo:root element contains the entire document. -- !---- fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; !---- !-- The layout-master-set defines a set of page layouts. For our -- !-- purposes here, we only need one. -- !---- fo:layout-master-set fo:simple-page-master page-master-name=main margin-top=75pt margin-bottom=75pt margin-left=75pt margin-right=75pt !---- !-- The region-body element is where all the action is. We'll put -- !-- all of our content into this space.-- !---- fo:region-body margin-bottom=75pt/ /fo:simple-page-master /fo:layout-master-set !---- !-- Our next step is to define the page styles used. We can -- !-- different page styles for the first page, odd pages, and even -- !-- pages. They're all the same for this simple document. -- !---- fo:page-sequence fo:sequence-specification fo:sequence-specifier-alternating page-master-first=main page-master-odd=main page-master-even=main/ /fo:sequence-specification !---- !-- Finally, we'll put everything into a flow element. -- !---- fo:flow !---- !-- To get the formatting we want, we'll put the content in a block-- !---- fo:block font-size=12pt line-height=15pt text-align=start space-after.optimum=24pt xsl:value-of select=title/ xsl:value-of select=content/paragraph/ /fo:block /fo:flow /fo:page-sequence /fo:root /xsl:template /xsl:stylesheet ?xml version=1.0 ? ?xml-stylesheet href=hello.xsl type=text/xsl?
Font Metric file from ttf file??
hello i have the ttf file and was trying to make fontmetric file using TTFReader class which is in fop.jar file.I was trying with java -cp fop.jar java org.apache.fop.fonts.apps.TTFReader C:\fonts\SHIVN___.ttf C:\fonts\SHIVN___.ttf shiva.xml but error no class found is obtaining.But i can see the TTFReader class in fop.jar.what is happening wrong with me. help expected. regards rajiv --- Jeremias Maerki [EMAIL PROTECTED] wrote: how can i generate font metric file from pfb fies which comes with font files.I don't have pfm files.I read that The PFMReader tool does not yet interpret PFB files.Please help me. The PFM is currently the only way. If you have a PFA (which is in a text format) you can quite easily construct the XML font metric file by hand if you bother to consult the Adobe manuals for Postscript Type 1 fonts. But with only a PFB you won't have much luck, I guess. Try to get hold of the corresponding PFM. 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] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: running from servlet, is buffering needed?
FWIW, in my opinion the overriding concern is that Fop should be able to run in a multi-threaded environment. As such, considering that this is a core feature, this should be fixed. Thanks, JT -Original Message- From: Seshadri G.K. [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 3:55 PM To: [EMAIL PROTECTED] Subject: running from servlet, is buffering needed? I want to know is the memory patch really needed when fop runs from a servelet. Iam sure when it is servelet invoked, the xsl-fo files are much smaller, because some user is waiting to see the files on the browser, unlike commandline where really big files could be used. If that is so, then I could commit the memory patch to fop. seshadri - 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: Problem with embedding fop
Hi all, I've tryed to embed FOP-0.18.1DEV with a servlet so that to render (xml,xsl) files into PDF. I am using Tomcat 3.2.1 as web container. Unfortunately, the call of the servlet works from Netscape Navigator and renders PDF. However, it doesn't work from Internet Explorer. in fact with IE, the process ends with a black page in the browser despite the well processing in Tomcat console ( all debuging info which are displayed with the netscape call are displayed too with IE call) You may want to add the suffix 'pdf' to your servlet url pattern within the 'web.xml' for your context, e.g. url-pattern/pdf_out.pdf/url-pattern I did this for my XML output to make IE display my XML files properly. It seems IE is not very interested in the content type you set :( Regards. -- Bjoern Martin[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Font Metric file from ttf file??
Rajiv, Please try with the following bat file after including the required jar file in the FOP running directory. -Original Message- From: rajeev nair [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 9:40 AM To: [EMAIL PROTECTED] Subject: Font Metric file from ttf file?? hello i have the ttf file and was trying to make fontmetric file using TTFReader class which is in fop.jar file.I was trying with java -cp fop.jar java org.apache.fop.fonts.apps.TTFReader C:\fonts\SHIVN___.ttf C:\fonts\SHIVN___.ttf shiva.xml but error no class found is obtaining.But i can see the TTFReader class in fop.jar.what is happening wrong with me. help expected. regards rajiv --- Jeremias Maerki [EMAIL PROTECTED] wrote: how can i generate font metric file from pfb fies which comes with font files.I don't have pfm files.I read that The PFMReader tool does not yet interpret PFB files.Please help me. The PFM is currently the only way. If you have a PFA (which is in a text format) you can quite easily construct the XML font metric file by hand if you bother to consult the Adobe manuals for Postscript Type 1 fonts. But with only a PFB you won't have much luck, I guess. Try to get hold of the corresponding PFM. 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] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] metricw.bat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Static-content vs. flow (newbee question)
Hi I have an SVG image which I would like to use as background image for all pages in the pdf-fileI am generating. Reading the previous postings in this list, it is my understanding that background image is not yet supported, is this correct? Instead a previous posting suggested to place the SVG image in e.g.xsl-region-after as a static content. But the static-content (the SVG) is placed above the flow of the body-region thus covering some of the text in the body-region. Is there any way to change this? or do anybody have a better idea? Suggestions appriciated Mads Sorensen
Re: XSLTInputHandler not doing its job??
Hi Gustavo, Karen and All! I am also using the same coding as how u code(below) to covert from XML to PDF using XSL. But I am getting No Such MethodError exception eventhough the method is existed in class file. Could u please help me to solve this problem. java.lang.NoSuchMethodError at org.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:348) at org.apache.xpath.patterns.NodeTest.execute(NodeTest.java:471) Thanks, Wahab. - Original Message - From: Wolf Gustavo (SGC-EXT) [EMAIL PROTECTED] To: Fop (E-mail) [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 11:49 PM Subject: XSLTInputHandler not doing its job?? Hi, as I said a few hours ago, I have the following code: InputHandler inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource); InputSource inputSource = inputHandler.getInputSource(); XMLReader parser = (XMLReader) Class.forName(this.parserClass).newInstance(); parser.setFeature(http://xml.org/sax/features/namespace-prefixes,true); /** * Creates the driver telling it to write the output to a file. */ Driver driver = new Driver(); driver.setRenderer(org.apache.fop.render.pdf.PDFRenderer); // ERROR IN THE FOLLOWING LINE driver.buildFOTree(parser, inputSource); File test = new File(test.pdf); driver.setOutputStream(new java.io.FileOutputStream(test)); driver.format(); driver.render(); In the second line, InputSource inputSource is suppossed to be the .fo file after the processing of xmlInputSource by xslInputSource. I am using as xmlInputSource and xslInputSource two files that I took from the chap 15 of the XMLbible (attached). Now, when the program tries to execute driver.buildFOTree(parser, inputSource);, I get the following msg and Exception: building formatting object tree WARNING: Unknown formatting object ^PERIODIC_TABLE FOPException: org.xml.sax.SAXException (msg: null) It seems to me that XSLTInputHandler is not doing its job properly, because of the WARNING. Again, if I run a line command with Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf everything is OK, which tells me that there shouldn't be a problem with the input files. Does anyone knows how to cure this? Thanks a lot, Gustavo prueba.xml prueba.xsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[Bug 2475] New: - Borders don't appear to work in fo:table-row
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2475 *** shadow/2475 Fri Jul 6 05:14:23 2001 --- shadow/2475.tmp.15120 Fri Jul 6 05:14:24 2001 *** *** 0 --- 1,35 + ++ + | Borders don't appear to work in fo:table-row | + ++ + |Bug #: 2475Product: Fop | + | Status: NEW Version: all | + | Resolution:Platform: PC | + | Severity: Normal OS/Version: Windows NT/2K | + | Priority: Other Component: pdf renderer| + ++ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED]| + | CC list: Cc: | + ++ + | URL: | + ++ + | DESCRIPTION | + In version 0.19.0-cvs, on NT: + + While the following works, + fo:table-cell + border-after-style=solid + border-after-width=2px ... ... + + the following appears NOT to work + fo:table-row + border-after-style=solid + border-after-width=2px ... ... + + Results seem to be consistent among + -awt + -print + -pdf + + 'best + -Ralph LaChance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
svg/PDFGraphics2D.java between version 1.7 and 1.8
Hi, I'm a great fan of org.apache.svg.PDFTranscoder or rather org.apache.svg.PDFDocumentGraphics2D. PDFDocumentGraphics2D initializes with super(textAsShapes) So the FontState in the superclass PDFGraphics2D is not initialized. After the augmentation of method PDFGraphics2D.drawString(...) on June 26 we're now bound for a NPE in line 710: fontState = new FontState(fontState.getFontInfo(), name, style, weight, size * 1000, 0); Keiron, please make me smile again. Jens Thieler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: running from servlet, is buffering needed?
I use FOP solely from a servlet to handle web-based reporting. Our company has a web-based student information system for k-12 schools. Currently we are using Access for reporting, but would like to switch to FO. We have already written everything to bulk print 3000 student report cards, but FOP will choke any server we have. Dave - Original Message - From: Seshadri G.K. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 1:25 AM Subject: running from servlet, is buffering needed? I want to know is the memory patch really needed when fop runs from a servelet. Iam sure when it is servelet invoked, the xsl-fo files are much smaller, because some user is waiting to see the files on the browser, unlike commandline where really big files could be used. If that is so, then I could commit the memory patch to fop. seshadri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
overflow-paginate
I am looking for help with overflow-paginate function of XSL. I have data elements that overflow the block sizes and overflow-paginate=8.00in doesn't seem to be workning for me. Robyn MacDuff [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Need Working Sample
Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 attachment: winmail.dat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Need Working Sample
There is a FOP servlet example in the distribution of FOP : /docs/examples/embedding/FopServlet.java I think it will answer all the beginners questions. See the example section on the FOP site to see all pre-answered question you might have in your beginning journey. (starting with http://xml.apache.org/fop/embedding.html) Cyril At 10:08 06/07/01 -0500, you wrote: Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need Working Sample
Hi Jim, I have exactly the same problem, and I've just found a non elegant, working solution: I generate my XML file, and then call the command line Fop from within my servlet: Runtime.getRuntime().exec(new String[]{java.exe, -cp, c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\w3c.jar;c:\\ fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\xerc es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar, org.apache.fop.apps.Fop, -xml , c:\\prueba.xml, -xsl , c:\\prueba.xsl, -pdf , c:\\prueba.pdf}); As I said, it is NOT elegant, but after sweating for days with problems of all type doing the elegant thing, I get my beautiful PDF on disk. Of course you should adapt the names of trhe directories and the xml and xsl files. Cheers, Gustavo PS: if someone has an elegant solution I would be happy to use it too. -Message d'origine- De : Jim Urban [mailto:[EMAIL PROTECTED]] Envoyé : vendredi, 6. juillet 2001 17:09 À : [EMAIL PROTECTED] Objet : Need Working Sample Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 Fichier: ATT14204.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: Need Working Sample
Hi Gustavo, the following works great: ByteArrayOutputStream out = new ByteArrayOutputStream(); Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); org.xml.sax.XMLReader parser = inputHandler.getParser(); driver.buildFOTree(parser, inputHandler.getInputSource()); driver.format(); driver.setOutputStream(out); driver.render(); response.setContentType(application/pdf); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); This example lets the servlet stream the result directly to the client browser. If you want to have the pdf file on your disk instead, just write use an other output stream! It currently does not work for IE5.5, but I'll check the hint of Alex McLintock earlier in this list. Hope this helps you out, ___ Erik Rehrmann - IOn AG [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 6. Juli 2001 17:11 An: '[EMAIL PROTECTED]' Betreff: RE: Need Working Sample Hi Jim, I have exactly the same problem, and I've just found a non elegant, working solution: I generate my XML file, and then call the command line Fop from within my servlet: Runtime.getRuntime().exec(new String[]{java.exe, -cp, c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib \\w3c.jar;c:\\ fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1- DEV\\lib\\xerc es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar, org.apache.fop.apps.Fop, -xml , c:\\prueba.xml, -xsl , c:\\prueba.xsl, -pdf , c:\\prueba.pdf}); As I said, it is NOT elegant, but after sweating for days with problems of all type doing the elegant thing, I get my beautiful PDF on disk. Of course you should adapt the names of trhe directories and the xml and xsl files. Cheers, Gustavo PS: if someone has an elegant solution I would be happy to use it too. -Message d'origine- De :Jim Urban [mailto:[EMAIL PROTECTED]] Envoyé :vendredi, 6. juillet 2001 17:09 À : [EMAIL PROTECTED] Objet : Need Working Sample Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 Fichier: ATT14204.txt - 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: Need Working Sample
Sorry, but this does not work for two reasons. 1. The XML does NOT exist on disk! It is in memory only, and writing it to disk is NOT an option. 2. This is a high traffic web application. Starting a new JVM to process FOP is too costly. There must be a way for this FOP thing to read raw (data only) XML (in memory) apply an XSL style sheet to add the FO tags, then format the PDF and return it to a browser. I can't believe I am the first person in the word to need to do this. If I seem upset, I'm sorry. But I have been fighting with FOP since last week to get it to do this. FOP works great for taking FO files and converting them to PDF files, but that's not what I have to do. I have a deadline to meet and I have wasted a week trying to get FOP to work. Jim -Original Message- From: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 10:11 AM To: '[EMAIL PROTECTED]' Subject: RE: Need Working Sample Hi Jim, I have exactly the same problem, and I've just found a non elegant, working solution: I generate my XML file, and then call the command line Fop from within my servlet: Runtime.getRuntime().exec(new String[]{java.exe, -cp, c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\w3c.jar;c:\\ fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\xerc es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar, org.apache.fop.apps.Fop, -xml , c:\\prueba.xml, -xsl , c:\\prueba.xsl, -pdf , c:\\prueba.pdf}); As I said, it is NOT elegant, but after sweating for days with problems of all type doing the elegant thing, I get my beautiful PDF on disk. Of course you should adapt the names of trhe directories and the xml and xsl files. Cheers, Gustavo PS: if someone has an elegant solution I would be happy to use it too. -Message d'origine- De : Jim Urban [mailto:[EMAIL PROTECTED]] Envoyé : vendredi, 6. juillet 2001 17:09 À : [EMAIL PROTECTED] Objet : Need Working Sample Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 Fichier: ATT14204.txt - 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: Need Working Sample
Hi Erik, I have tried your stuff, but it still gives me the same problem i have since two days after I try to instantiate the parser: javax.xml.transform.TransformerConfigurationException: Namespace not supported by SAXParser Error msg: null At the risk of looking abusive, could someone take a look at the xml and xsl files (they are really short examples that work with Fop as a line command, and I'll invite a beer to whomever comes to Geneva (CH, not IL) to pick it up)? They are attached once more. Really thanks, and sorry to know that Jim cannot use my non-elegant solution. I am fighting this stuff for days also and I have to finish my project by next Friday. -Message d'origine- De : Erik Rehrmann [mailto:[EMAIL PROTECTED]] Envoyé : vendredi, 6. juillet 2001 17:26 À : '[EMAIL PROTECTED]' Objet : AW: Need Working Sample Hi Gustavo, the following works great: ByteArrayOutputStream out = new ByteArrayOutputStream(); Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); org.xml.sax.XMLReader parser = inputHandler.getParser(); driver.buildFOTree(parser, inputHandler.getInputSource()); driver.format(); driver.setOutputStream(out); driver.render(); response.setContentType(application/pdf); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); This example lets the servlet stream the result directly to the client browser. If you want to have the pdf file on your disk instead, just write use an other output stream! It currently does not work for IE5.5, but I'll check the hint of Alex McLintock earlier in this list. Hope this helps you out, ___ Erik Rehrmann - IOn AG [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 6. Juli 2001 17:11 An: '[EMAIL PROTECTED]' Betreff: RE: Need Working Sample Hi Jim, I have exactly the same problem, and I've just found a non elegant, working solution: I generate my XML file, and then call the command line Fop from within my servlet: Runtime.getRuntime().exec(new String[]{java.exe, -cp, c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib \\w3c.jar;c:\\ fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1- DEV\\lib\\xerc es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar, org.apache.fop.apps.Fop, -xml , c:\\prueba.xml, -xsl , c:\\prueba.xsl, -pdf , c:\\prueba.pdf}); As I said, it is NOT elegant, but after sweating for days with problems of all type doing the elegant thing, I get my beautiful PDF on disk. Of course you should adapt the names of trhe directories and the xml and xsl files. Cheers, Gustavo PS: if someone has an elegant solution I would be happy to use it too. -Message d'origine- De :Jim Urban [mailto:[EMAIL PROTECTED]] Envoyé :vendredi, 6. juillet 2001 17:09 À : [EMAIL PROTECTED] Objet : Need Working Sample Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 Fichier: ATT14204.txt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] prueba.xml prueba.xsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: Need Working Sample
Jim, don't be upset! Please take into account that the mails arrived not right on time when you sent another mail! I sent my mail BEFORE I saw you're working with memory streams! It's is possible to handle strings as stream. Have a look at the streams bean of alphaworks (streams.jar) http://www.alphaworks.ibm.com/ab.nsf/techreqs/Streams Hey, ... keep cool, it's just another deadline ;-) ___ Erik Rehrmann - IOn AG [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Jim Urban [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 6. Juli 2001 17:52 An: [EMAIL PROTECTED] Betreff: RE: Need Working Sample Sorry, but this does not work for two reasons. 1. The XML does NOT exist on disk! It is in memory only, and writing it to disk is NOT an option. 2. This is a high traffic web application. Starting a new JVM to process FOP is too costly. There must be a way for this FOP thing to read raw (data only) XML (in memory) apply an XSL style sheet to add the FO tags, then format the PDF and return it to a browser. I can't believe I am the first person in the word to need to do this. If I seem upset, I'm sorry. But I have been fighting with FOP since last week to get it to do this. FOP works great for taking FO files and converting them to PDF files, but that's not what I have to do. I have a deadline to meet and I have wasted a week trying to get FOP to work. Jim -Original Message- From: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 10:11 AM To: '[EMAIL PROTECTED]' Subject: RE: Need Working Sample Hi Jim, I have exactly the same problem, and I've just found a non elegant, working solution: I generate my XML file, and then call the command line Fop from within my servlet: Runtime.getRuntime().exec(new String[]{java.exe, -cp, c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib \\w3c.jar;c:\\ fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1- DEV\\lib\\xerc es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar, org.apache.fop.apps.Fop, -xml , c:\\prueba.xml, -xsl , c:\\prueba.xsl, -pdf , c:\\prueba.pdf}); As I said, it is NOT elegant, but after sweating for days with problems of all type doing the elegant thing, I get my beautiful PDF on disk. Of course you should adapt the names of trhe directories and the xml and xsl files. Cheers, Gustavo PS: if someone has an elegant solution I would be happy to use it too. -Message d'origine- De :Jim Urban [mailto:[EMAIL PROTECTED]] Envoyé :vendredi, 6. juillet 2001 17:09 À : [EMAIL PROTECTED] Objet : Need Working Sample Hi, I am new to FOP. I have a servlet which dynamically generates XML. I need to apply an XSL stylesheet containing FO tags to generate a FO version of the XML and then I need to run this FO version of the XML through FOP (or Driver) so the servlet can return a dynamically created PDF to the browser. Does anyone have a working example of how to do this? Only the XSL style sheet containing the FO tags used in the initial transform will be on disk. Please help, I have to get this working. Thanks, Jim Urban Product Manager Netsteps Inc. Suite 505E 1 Pierce Pl. Itasca, IL 60143 Voice: (630) 250-3045 x2164 Fax: (630) 250-3046 Fichier: ATT14204.txt - 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: Need Working Sample
The FopServlet reads a .fo file. This is of no use to me. I will dyamically generate XML contianing only data. This XML will be in a StringBuffer. I first need to apply an XSL sytle sheet to this StringBuffer, generating a new XML stream (IN MEMORY). This new (IN MEMORY) XML stream then needs to be ran through FOP to generate a PDF stream which will be sent back to the browser. The embed sample also shows how to process .FO files. This is not what I want The ONLY file that can be on disk is the XSL file which contains the FO tags to apply to the XML data. Applying XSL to your XML in memory should be fairly easy. The transformation APIs in JAXP handle this. then just edit the servlet code to handle something other than a file stream. I got this to work without much problem a while ago. My code is appended below -- I think it worked with 0.17, haven't checked it in a while. It differs only slightly from the original. The fo data comes in an HTTP parameter called fo, though you can change the name. It loads this all into the String called fo. Then when it sets up the driver, instead of passing it a FileInputSource, it passes it a StringInputSource derived from the fo String. I dimly recollect that the Driver interface changed a lot in 0.18 so some of these methods may now be hidden, i.e. not called directly in the servlet, but if you manually configure your driver, changing the type of input source you hand it should not be hard. -- sgl /*-- $Id: FopServlet.java,v 1.2 2001/03/03 07:06:03 kellyc Exp $ -- The Apache Software License, Version 1.1 Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: This product includes software developed by the Apache Software Foundation (http://www.apache.org/). Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names Fop and Apache Software Foundation must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called Apache, nor may Apache appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by James Tauber [EMAIL PROTECTED]. For more information on the Apache Software Foundation, please see http://www.apache.org/. */ // Java import java.io.*; import java.net.URL; import java.util.Date; import javax.servlet.*; import javax.servlet.http.*; // SAX import org.xml.sax.XMLReader; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; // FOP import org.apache.fop.messaging.MessageHandler; import org.apache.fop.configuration.Configuration; import org.apache.fop.apps.Driver; import org.apache.fop.apps.Version; /** * Example servlet to generate a PDF from a servlet. * Servlet param is: * ul * lifo: the path to a formatting object file to render * /ul * * Example URL: http://servername/servlet/FopServlet?fo=/home/fop/example/readme.fo * */ public class FopStream extends HttpServlet { public static final String FO_REQUEST_PARAM = fo; /**
About testing
Hi Keiron, It looks like you are the testing guru. Thanks for taking the initiative on this; I agree that it's crucial. I've finally got around to looking at this in more detail, as I'm trying to add some good cases for tables. I have one problem and one question. Problem: For some reason, certainly relating to ClassLoader behavior, if I run build.sh test in my xml-fop directory, the version checking code in RunTest is finding the ./conf/config.xml file locally before it finds the one in the test/reference/jar. The result is that it refuses the version since it's FOP @version@ and not FOP 0.19.0-CVS or whatever. I find if I hide the conf/config.xml file, it uses the one in the jar and everything works fine. Have you noticed this by any chance? Perhaps it's due to a java bug - I'm using the Sun JDK 1.2.2 for Linux (Mandrake). Question: I see that the XML rendering doesn't have lots of traits, no Area Container positioning for example, no line-height information etc. Is it a reasonable thing to enhance the output format to include (eventually) all the traits which are supposed to be on areas? Regards, Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: running from servlet, is buffering needed?
No, seshadri. Can't I call FOP from the servlet too. need the memory buffer for the servlet...my reports are approx. 300-500 pages and currently I have set my XMX to 384Mhowever, I would like to avoid doing that to my app. server. -Chetan Dave Frankson wrote: I use FOP solely from a servlet to handle web-based reporting. Our company has a web-based student information system for k-12 schools. Currently we are using Access for reporting, but would like to switch to FO. We have already written everything to bulk print 3000 student report cards, but FOP will choke any server we have. Dave - Original Message - From: Seshadri G.K. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 1:25 AM Subject: running from servlet, is buffering needed? I want to know is the memory patch really needed when fop runs from a servelet. Iam sure when it is servelet invoked, the xsl-fo files are much smaller, because some user is waiting to see the files on the browser, unlike commandline where really big files could be used. If that is so, then I could commit the memory patch to fop. seshadri - 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: About testing
At 11:33 PM 7/6/01 +0200, Karen Lease wrote: Question: I see that the XML rendering doesn't have lots of traits, no Area Container positioning for example, no line-height information etc. Is it a reasonable thing to enhance the output format to include (eventually) all the traits which are supposed to be on areas? I would support having everything. After all, I don't think it is really meant to be read by humans - the XML output should be post-processed. AntennaHouse XSLFormatter prints out practically everything. I think we could have several levels of detail (which I think I might have put in there already to some degree); someone may not be interested in levels below regions, someone else might want down to blocks, someone else may want everything right down to inlines in agonizing detail. Regards, Arved Sandstrom Fairly Senior Software Type e-plicity (http://www.e-plicity.com) Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[Bug 2429] - Incorrect handeling of fo:leader attribute leader-pattern
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2429 *** shadow/2429 Tue Jul 3 00:26:23 2001 --- shadow/2429.tmp.21975 Fri Jul 6 17:10:12 2001 *** *** 2,9 | Incorrect handeling of fo:leader attribute leader-pattern | ++ |Bug #: 2429Product: Fop | ! | Status: NEW Version: all | ! | Resolution:Platform: All | | Severity: Normal OS/Version: Linux | | Priority: Other Component: pdf renderer| ++ --- 2,9 | Incorrect handeling of fo:leader attribute leader-pattern | ++ |Bug #: 2429Product: Fop | ! | Status: RESOLVEDVersion: all | ! | Resolution: FIXED Platform: All | | Severity: Normal OS/Version: Linux | | Priority: Other Component: pdf renderer| ++ *** *** 36,39 instead of !3.5 Graphics ... xx --- 36,43 instead of !3.5 Graphics ... xx ! ! --- Additional Comments From [EMAIL PROTECTED] 2001-07-06 17:10 --- ! This is probably the same bug as the one I reported and supplied a patch for ! in the fop-dev mailing list a few days ago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]