Same servlet problem
Hi at All, I have encountered the same problem of Carmelo, I have a JSP Page that generate dinamically PDF file getting input XML Dynamic and urlXSL! My jsp generate correctly with FOP 0.20.1 a PDF file but when I'm trying to open it M.IE visualize me (the pdf) like a object ActiveX on left top page! Please can something help me? tanks in advance Rajagopal. V wrote: [EMAIL PROTECTED]"> Its a IE bug. Look at the msdn.microsoft.com for howto open PDFs from IE. IE expects ur command line toend with a .pdf so that it will opn the PDF. I couldnot find a solution ot the problem.--- Carmelo Montanez [EMAIL PROTECTED] wrote: Thanks!!!Actually I changed the servlet to use the"getOutputStream()" and it worksfine evenfor non-binary data. My new problem is the IE6 donot properly displays thePDF data, I get what seems to be PDF internal stuff(what you will see ifyou try to edit a PDF file in an editor). I thinkIE6 should be able toreadPDF data correctly. Anyone aware of any details Ineed to set?Carmelo - To unsubscribe, e-mail:[EMAIL PROTECTED]For additional commands, email:[EMAIL PROTECTED] __Do You Yahoo!?Get email alerts NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
Re: RE: Generating PDF on Fly
Hi, What are changes in FOP API 0.20.1 exactly ? Thanks in adavance ? Messages d´origine De: Shkuro, Yuri [EMAIL PROTECTED] Date: vendredi 21 septembre 2001 16:57 Objet: RE: Generating PDF on Fly Yes. See attached JSP. Without a parameter it reads static XML file and displays it in HTML format, with 'fo' parameter it reads the .fo file and displays PDF, and also has a link to display static XML as PDF. It's easy to modify this to read external XML file and output PDF. It used to work with FOP 0.19 - you may need to tweak it a little for FOP 0.20 due to API changes (namely, comment out driver.render() and driver.format()). YS -Original Message- From: Semprini Davide [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 10:34 AM To: fop-dev Subject: Generating PDF on Fly Hi, I have a question: Is possible to generate and VISUALIZE with a common Browser with Acrobat Reader plug-in a PDF using a JSP that take in input a Dynamic XML? Tanks! D.Semprini - 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]
Fop2PDFServlet using FOP 0.20.1
Fop2PDFServlet using FOP 0.20.1 Hi all, I need example of servlet using FOP 0.20.1 and wich generate PDF file from xsl file and xmlString. I've old code wich don't work now with this last version. What is the best way xmlString or creating DOM object if I've not xml file. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Performance and java 1.1
So in conclusion I think there is a general consensus (vote) to move to java 1.2. I will commit what I have so far for the next release. For java 1.1 users: Sorry but I think it is better to do it this way. To run with java 1.1 you could use the collections.jar and change the import statements. Other changes may also be needed. About threading issues: There is only a problem if the HashMap is being added to at the same time as it is also being added to or being read from. This is simple for the main use, properties and elements where the adding can be put into a synchronized block. The advantage is that it is possible to read from two threads at the same time where hastable would prevent this. I think in most of our data it should be fairly easy to handle. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java
keiron 01/09/24 01:51:17 Modified:docs/design build.xml docs/examples build.xml docs/xml-docs build.xml lib buildtools.jar src/org/apache/fop/pdf PDFDocument.java src/org/apache/fop/tools/anttasks Fop.java Log: this patch alters the fop ant task so that other render output formats are supported output type can be specified by mime type and also handles file sets Submitted by: Jeremias Maerki [EMAIL PROTECTED] Revision ChangesPath 1.3 +42 -57xml-fop/docs/design/build.xml Index: build.xml === RCS file: /home/cvs/xml-fop/docs/design/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 2001/09/10 11:32:13 1.2 +++ build.xml 2001/09/24 08:51:17 1.3 @@ -1,73 +1,58 @@ ?xml version=1.0? - !-- === -- !-- JBoss documentation build file -- !-- === -- - project name=FOPDocs default=docs basedir=./ - target name=init + target name=init property name=Name value=FOPDocs/ property name=name value=fopdocs/ property name=version value=0.1/ - property name=lib.dir value=${basedir}/lib/ - - taskdef name=xslt classname=org.apache.fop.tools.anttasks.Xslt/ - taskdef name=fop classname=org.apache.fop.tools.anttasks.Fop/ -/target - - !-- === -- - !-- Generate a help screen -- - !-- === -- - target name=help depends=init - -echo message=${name}-${version} build file, available targets: / -echo message= / -echo message=main: Compile and prepare deployment directory. / -echo message=pdf : Compile and prepare pdf user docs. / -echo message=clean : Clean deployment and distribution. / -echo message= / -echo message= USAGE: build lt;targetgt; / - - /target - - !-- === -- - !-- Prepares the build directory-- - !-- === -- - target name=prepare depends=init - /target - - !-- === -- - !-- Generates the pdf documentation -- - !-- === -- - target name=pdf depends=prepare -echo message=Building pdf documentation. Please wait .../ -delete file=fop.fo/ -xslt infile=fop.xml xsltfile=docbook/fo/docbook.xsl -dependent=fop.xml -outfile=fop.fo smart=yes/ -!-- + taskdef name=xslt classname=org.apache.fop.tools.anttasks.Xslt/ + taskdef name=fop classname=org.apache.fop.tools.anttasks.Fop/ + /target + !-- === -- + !-- Generate a help screen -- + !-- === -- + target name=help depends=init + echo message=${name}-${version} build file, available targets:/ + echo message=/ + echo message=main: Compile and prepare deployment directory. / + echo message=pdf : Compile and prepare pdf user docs. / + echo message=clean : Clean deployment and distribution. / + echo message=/ + echo message= USAGE: build lt;targetgt; / + /target + !-- === -- + !-- Prepares the build directory-- + !-- === -- + target name=prepare depends=init/ + !-- === -- + !-- Generates the pdf documentation -- + !-- === -- + target name=pdf depends=prepare + echo
Will there be a RTF renderer?
Hi there! Out customers would like to have a Word-doc out of FOP. Will there be a RTF renderer in the near future? Is something like that planed? Christian __ DIRON Wirtschaftsinformatik GmbH Co. KG Christian Beer ([EMAIL PROTECTED]) Daimlerweg 39-41Tel. : +49(251)979-200 48163 Muenster Fax : +49(251)979-2020 Germany Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Will there be a RTF renderer?
On Monday 24 September 2001 12:18, Beer, Christian wrote: Will there be a RTF renderer in the near future? We (my company, I'm not speaking for the FOP team) have been working on an RTF renderer earlier this year, and later scrapped it for a standalone implementation known as jfor that is released under the MPL license. So currently AFAIK there is no RTF renderer for FOP, but jfor will allow you to convert XSL-FO documents to RTF. You can find more info at www.jfor.org. -- -- Bertrand Delacrétaz, www.codeconsult.ch -- web technologies consultant - OO, Java, XML, C++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: Will there be a RTF renderer?
Well, I tried that jfor earlier this day, but it doesn't realy do layouting. I hoped the letter would look like the PDF but it doesn't. So if somebody knows a fo2rtf-processor that does the layouting I'd like to hear about that. Thanks Christian -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 24. September 2001 13:40 An: [EMAIL PROTECTED] Betreff: Re: Will there be a RTF renderer? On Monday 24 September 2001 12:18, Beer, Christian wrote: Will there be a RTF renderer in the near future? We (my company, I'm not speaking for the FOP team) have been working on an RTF renderer earlier this year, and later scrapped it for a standalone implementation known as jfor that is released under the MPL license. So currently AFAIK there is no RTF renderer for FOP, but jfor will allow you to convert XSL-FO documents to RTF. You can find more info at www.jfor.org. -- -- Bertrand Delacrétaz, www.codeconsult.ch -- web technologies consultant - OO, Java, XML, C++ - 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: Will there be a RTF renderer?
Hi Christian, I recently got mail from Bertrand Delacretaz [EMAIL PROTECTED] who works on a project (sourceforge) called jfor. As far as I understood, it's a formatter from xsl-fo into rtf. Ask the expert at www.jfor.org ;-) - Corinna - Original Message - From: Beer, Christian [EMAIL PROTECTED] To: Fop-liste (E-Mail) [EMAIL PROTECTED] Sent: Monday, September 24, 2001 12:18 PM Subject: Will there be a RTF renderer? Hi there! Out customers would like to have a Word-doc out of FOP. Will there be a RTF renderer in the near future? Is something like that planed? Christian __ DIRON Wirtschaftsinformatik GmbH Co. KG Christian Beer ([EMAIL PROTECTED]) Daimlerweg 39-41Tel. : +49(251)979-200 48163 Muenster Fax : +49(251)979-2020 Germany 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 WARNING
I am trying to generate PDFs using FOP-0.20.1. The input files are xml and xsl files I am using JRun3.0 with java1.2.2 Here is the error I get WARNING: Unknown formatting object ^root Anybody any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Wrap option
hello everybody The problem I am facing is like this: While using the wrap-option in fo:block, I find that long words placed in a table-cell do not wrap and spill over to next cell. Suppose I have a word Worldisgoingdown and the space defined in table-column is 1 inch then it spills over. If the words are spaced out ,then wrapping occurs World is going down. So you see, fo:block wrap-option=wrap is not working. I would be glad if anyone of you could help me out. Regards, Anirban. E-mails:- [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: +91 33 3373767 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP WARNING
Hi, I want explain that the error: WARNING: Unknown formatting object ^root for me is locate in stylesheet Instead the error that Ihave encountered it was on my XML I think that the parser didn't know my element root! For this reason I haven't used the code in fop home and I have perform first the transformation and then the driver Bye D.Semprini Semprini Davide wrote: [EMAIL PROTECTED]"> Hi, I have had the same problem Nobody give me a response! This code in FOP Home page don't work (for me!) ! Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); I have solved the problem using 2 phase: 1) generate the transformation using XSLTrasform, Xalan1Transform etc... (you can choose) code: XSLTransform traXSLT = new XSLTransform(); traXSLT.transform(urlXML, urlXSL, urlFoFile); You can choose 4 transform type (see the api documentation) 2) Apply the result at the driver FileInputStream file = new FileInputStream(urlFoFile); response.setContentType("application/pdf"); Driver driver = new Driver(new InputSource(file), out); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); THIS CODE WORK FINE!!! Bye Amit wrote: [EMAIL PROTECTED]"> I am trying to generate PDFs using FOP-0.20.1. The input files are xmland xsl filesI am using JRun3.0 with java1.2.2Here is the error I getWARNING: Unknown formatting object ^rootAnybody any ideas?-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
Re: FOP WARNING
Okay, The example that I give is only to explain that you can perform the PDF in two distinc phase 1) perform a trasformation 2) use driver You can use the "tranform method" with input like Dynamic xml (Dom Document) or urlXML and getting out a fo (Dom Document) or Writer object YOU HAVE A LOT OF TRANSFORM TO USE!! YOU HAVE TO SEE THE APIDOC FOR THE COMPLETE DOCUMENTATION For example in my project I use xalan transform and with some conversion I use the Fop driver and my XML is dynamic. WITH Transformer XALAN: StringWriter SstringWriter = new StringWriter(); /* this is the fo file */ StreamResult SstreamResult = new StreamResult(SstringWriter); transformer.transform(SstreamSourceXML, SstreamResult) /* convert the fo file in a right format for driver ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); SResult = SstringWriter.toString(); ByteArrayInputStream str = new ByteArrayInputStream(SResult.getBytes()); Driver driver = new Driver(new InputSource(str), outPDF); Is this performance? I think yes!! Bye Amit wrote: [EMAIL PROTECTED]"> Looking at your code I am guessing that you wrote the fo file out to the filesystem and then used the driver to convert it to PDF...how is performance on that? Instead of writing the file out to the file system did you try converting into some sorta stream and use the driver?? thanks for your help Amit Semprini Davide wrote: Hi, I have had the same problem Nobody give me a response! This code in FOP Home page don't work (for me!) ! Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); I have solved the problem using 2 phase: 1) generate the transformation using XSLTrasform, Xalan1Transform etc... (you can choose) code: XSLTransform traXSLT = new XSLTransform(); traXSLT.transform(urlXML, urlXSL, urlFoFile); You can choose 4 transform type (see the api documentation) 2) Apply the result at the driver FileInputStream file = new FileInputStream(urlFoFile); response.setContentType("application/pdf"); Driver driver = new Driver(new InputSource(file), out); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); THIS CODE WORK FINE!!! Bye Amit wrote: [EMAIL PROTECTED]"> I am trying to generate PDFs using FOP-0.20.1. The input files are xmland xsl filesI am using JRun3.0 with java1.2.2Here is the error I getWARNING: Unknown formatting object ^rootAnybody any ideas?-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
RE: FOP WARNING
Two problem with this approach. First, you are using a lot of memory to store intermediate XML result in a string buffer. Second, you have to parse that XML again (FOP will do it for you, but it takes time). A better solution, as I already said before, is to register FOP as a receiver of SAX events fired by XALAN on the first transformation - this was you eliminate both problems and do all your work in one pass. Just create a Transformer from the stylesheet and do // 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( whatever you writing to ); // 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( whatever XML source you have, saxResult ); YS -Original Message- From: Semprini Davide [mailto:[EMAIL PROTECTED]] Sent: Monday, September 24, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: Re: FOP WARNING Okay, The example that I give is only to explain that you can perform the PDF in two distinc phase 1) perform a trasformation 2) use driver You can use the tranform method with input like Dynamic xml (Dom Document) or urlXML and getting out a fo (Dom Document) or Writer object YOU HAVE A LOT OF TRANSFORM TO USE!! YOU HAVE TO SEE THE APIDOC FOR THE COMPLETE DOCUMENTATION For example in my project I use xalan transform and with some conversion I use the Fop driver and my XML is dynamic. WITH Transformer XALAN: StringWriter SstringWriter = new StringWriter(); /* this is the fo file */ StreamResult SstreamResult = new StreamResult(SstringWriter); transformer.transform(SstreamSourceXML, SstreamResult) /* convert the fo file in a right format for driver ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); SResult = SstringWriter.toString(); ByteArrayInputStream str = new ByteArrayInputStream(SResult.getBytes()); Driver driver = new Driver(new InputSource(str), outPDF); Is this performance? I think yes!! Bye Amit wrote: Looking at your code I am guessing that you wrote the fo file out to the filesystem and then used the driver to convert it to PDF...how is performance on that? Instead of writing the file out to the file system did you try converting into some sorta stream and use the driver?? thanks for your help Amit Semprini Davide wrote: Hi, I have had the same problem Nobody give me a response! This code in FOP Home page don't work (for me!) ! Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); I have solved the problem using 2 phase: 1) generate the transformation using XSLTrasform, Xalan1Transform etc... (you can choose) code: XSLTransform traXSLT = new XSLTransform(); traXSLT.transform(urlXML, urlXSL, urlFoFile); You can choose 4 transform type (see the api documentation) 2) Apply the result at the driver FileInputStream file = new FileInputStream(urlFoFile); response.setContentType(application/pdf); Driver driver = new Driver(new InputSource(file), out); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); THIS CODE WORK FINE!!! Bye Amit wrote: I am trying to generate PDFs using FOP-0.20.1. The input files are xmland xsl filesI am using JRun3.0 with java1.2.2Here is the error I getWARNING: Unknown formatting object ^rootAnybody any ideas?-T o unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Wrap option
Anirban: I believe, and correct me if I am wrong, that the formatter does not know how to wrap in this instance. In your case, World is going down, the formatter can wrap it on whitespace. Since there is no whitespace in Worldisgoingdown, it does not know how to wrap it. I'm sure there is some pretty neat code for resizing your columns based on the max size of the text in the cell. We are having an issue like this for table columns that are different for each language we support (a word in English might be quite larger in Spanish or German). I hope this is what you are asking. -Lou Anirban Bhaumik [EMAIL PROTECTED] on 09/24/2001 08:24:31 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Wrap option hello everybody The problem I am facing is like this: While using the wrap-option in fo:block, I find that long words placed in a table-cell do not wrap and spill over to next cell. Suppose I have a word Worldisgoingdown and the space defined in table-column is 1 inch then it spills over. If the words are spaced out ,then wrapping occurs World is going down. So you see, fo:block wrap-option=wrap is not working. I would be glad if anyone of you could help me out. Regards, Anirban. E-mails:- [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: +91 33 3373767 - 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: FOP on IBM AS400
We had problems with gif files. However BMP's work fine on AS/400, as suggested below. We are using FOP v 0.18 to render PDF's. JohnPT fop-dev-return-10469-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/22/01 04:42 AM Subject: Re: FOP on IBM AS400 Please respond to fop-dev 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. I've successfully run FOP on a AS/400 with PDF, PS and PCL output but without images. I *think* BMP images should work as they don't need AWT. Stephen Fry CODA Plc Christian - 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: FOP WARNING
I am trying this piece of code and it can't find the xml and xsl files... Anybody see anything that I am doing wrong? public void makePDF(String xmlFile, String xslFile, HttpServletResponse response) throws ServletException { java.io.Reader reader; Writer writer = new StringWriter(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); XSLTransform.transform(xmlFile, xslFile, writer); reader = new StringReader(writer.toString()); response.setContentType("application/pdf"); Driver driver = new Driver(new InputSource(reader), out); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } catch (Exception ex) { throw new ServletException(ex); } } Any help is greatly appreciated Semprini Davide wrote: Okay, The example that I give is only to explain that you can perform the PDF in two distinc phase 1) perform a trasformation 2) use driver You can use the "tranform method" with input like Dynamic xml (Dom Document) or urlXML and getting out a fo (Dom Document) or Writer object YOU HAVE A LOT OF TRANSFORM TO USE!! YOU HAVE TO SEE THE APIDOC FOR THE COMPLETE DOCUMENTATION For example in my project I use xalan transform and with some conversion I use the Fop driver and my XML is dynamic. WITH Transformer XALAN: StringWriter SstringWriter = new StringWriter(); /* this is the fo file */ StreamResult SstreamResult = new StreamResult(SstringWriter); transformer.transform(SstreamSourceXML, SstreamResult) /* convert the fo file in a right format for driver ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); SResult = SstringWriter.toString(); ByteArrayInputStream str = new ByteArrayInputStream(SResult.getBytes()); Driver driver = new Driver(new InputSource(str), outPDF); Is this performance? I think yes!! Bye Amit wrote: [EMAIL PROTECTED]">Looking at your code I am guessing that you wrote the fo file out to the filesystem and then used the driver to convert it to PDF...how is performance on that? Instead of writing the file out to the file system did you try converting into some sorta stream and use the driver?? thanks for your help Amit Semprini Davide wrote: Hi, I have had the same problem Nobody give me a response! This code in FOP Home page don't work (for me!) ! Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); driver.render(parser, inputHandler.getInputSource()); I have solved the problem using 2 phase: 1) generate the transformation using XSLTrasform, Xalan1Transform etc... (you can choose) code: XSLTransform traXSLT = new XSLTransform(); traXSLT.transform(urlXML, urlXSL, urlFoFile); You can choose 4 transform type (see the api documentation) 2) Apply the result at the driver FileInputStream file = new FileInputStream(urlFoFile); response.setContentType("application/pdf"); Driver driver = new Driver(new InputSource(file), out); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); THIS CODE WORK FINE!!! Bye Amit wrote: [EMAIL PROTECTED]"> I am trying to generate PDFs using FOP-0.20.1. The input files are xml and xsl files I am using JRun3.0 with java1.2.2 Here is the error I get WARNING: Unknown formatting object ^root Anybody any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Batik/SVG working in latest FOP builds?
Sorry to be dumb about this, but I just joined the list recently. My customer just added a requirement to use SVG images as external-graphics. (Up to now it had been the usual GIFs and JPGs, but now we are working on the hi-res print version and quality matters ...) To scale the images properly I'll need to use tricks like examples\svg\external.fo. With the latest FOP from CVS, I'm getting exceptions on the example file (below). Is this operator error, the expected result, or other? Thanks, - Rob [INFO]: building formatting object tree Exception in thread main java.lang.NoSuchMethodError at org.apache.fop.svg.SVGElement.init(SVGElement.java:175) at org.apache.fop.svg.SVGElement.init(SVGElement.java:83) at org.apache.fop.svg.SVGElement$Maker.make(SVGElement.java:60) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:254) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1371) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML Validator.java:840) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen tScanner.java:1853) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp atch(XMLDocumentScanner.java:1234) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS canner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at org.apache.fop.apps.Driver.render(Driver.java:459) at org.apache.fop.apps.AWTStarter.run(AWTStarter.java:116) at org.apache.fop.apps.Fop.main(Fop.java:19) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Anything wrong with this code
Hi All: I know that my browser can display PDF propertly now, however the following piece of code (that generates PDF data) sends the data back to the client (IE6) and still does not not looks like PDF at all. Can someone please tell me if there is something wrong with this code. By the way (out = response.getOutputStream() and "foFile" comes from an "FO" file). public void renderFO(InputSource foFile, HttpServletResponse response) throws IOException { try { ByteArrayOutputStream outPDF = new ByteArrayOutputStream(); response.setContentType("application/pdf"); Driver driver = new Driver(foFile, outPDF); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(outPDF); driver.run(); byte[] content = outPDF.toByteArray(); response.setContentLength(content.length); out.write(content); out.flush(); } catch (Exception ex) { System.out.println(ex); } Thanks, Carmelo Montanez Carmelo MontanezNIST Stop 8970Gaithersburg, MD 20899 [EMAIL PROTECTED]
Re: Configuring the FOP 0.18 in Cocoon 1.8 or more
sudhakar, I wrote an article for the August issue of Midrange Computing that covers that topic. If you do not have access to the magazine, I can forward a copy of that article to you. The main challenges are with the Cocoon jar file. I found through a process of elimination that on some releases (V4R5 some group) one package had to be removed from the jar file. The article covers setup with Tomcat, which I would recommend over WebSphere. The installation is pretty strait forward and can be as simple as drag and drop from a working windows setup to a mapped drive on your AS/400 or iSeries. You then have to modify Tomcat's startup script, which isn't too hard to set the appropriate class path. David Morris [EMAIL PROTECTED] 09/22/01 03:29 AM hello, can anybody tell me how to configure the FOP 0.18 in cocoon 1.8 or more. Thanks in advance. sudhakar sankar - 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: FOP on IBM AS400
Stephen, I have also used FOP quite a bit on an iSeries AS/400. Ideally you should be on V4R5 or V5R1 with the latest group and cum. On earlier groups, I experienced problems loading some classes. I have been using the .19 version distributed with Cocoon2. David Morris [EMAIL PROTECTED] 09/22/01 03:43 AM 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. I've successfully run FOP on a AS/400 with PDF, PS and PCL output but without images. I *think* BMP images should work as they don't need AWT. Stephen Fry CODA Plc Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]