Error conversion XML to PDF: Exception in thread main java.lang.OutOfMemoryError
My name isAlessandro Bicocchi, I works in Bonfiglioli Riduttori (Italy). We create an XML file in ASCIIofa size 1 MB (the file XML is an order of 300 rows), when I launch Fop-parser (fop0.20.3)to converte XMLtoPDF using XSL: the parserstops when it processesthe 28 row with this message: "Exceptionin thread "main" java.lang.OutOfMemoryError". My system is WinNt 4.0 Server, If you could help me solve the problem in some way, I will be greatful. Thank you very much, Ing. Alessandro Bicocchi
Japanese char support by FOP or not...
Hi, I want to know that whether FOP support Japanese character. I tried to insert some Japanese character in fo file, but couldn't get the proper data(Japanese chars.) in output pdf file. Can anyone suggest me anything about this. Thanks, Anil Mishra This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Error conversion XML to PDF: Exception in thread main java.lang.OutOfMemoryError
Is the XSL file causing a loop? Files of this size should be OK. ie: do you use recursive templates: xsl:call-template name="a"/ xsl:template name="a" ...output stuff xsl:call-template name="a"/ /xsl:template will cause OutOfMemory. Otherwise, look at the java -X options for increasing the maximum memory available to java - it defaults fairly low. Alistair -Original Message-From: Alessandro Bicocchi [mailto:[EMAIL PROTECTED]]Sent: 20 May 2002 11:38To: [EMAIL PROTECTED]Subject: Error conversion XML to PDF: Exception in thread main java.lang.OutOfMemoryError My name isAlessandro Bicocchi, I works in Bonfiglioli Riduttori (Italy). We create an XML file in ASCIIofa size 1 MB (the file XML is an order of 300 rows), when I launch Fop-parser (fop0.20.3)to converte XMLtoPDF using XSL: the parserstops when it processesthe 28 row with this message: "Exceptionin thread "main" java.lang.OutOfMemoryError". My system is WinNt 4.0 Server, If you could help me solve the problem in some way, I will be greatful. Thank you very much, Ing. Alessandro Bicocchi
Re: Font Metrics AWT
At 05:18 PM 5/19/02, you wrote: Oh my. I seem to have been too fast on this, maybe. Anyway, I'm going to bed now. Well, in my opinion, the previous change ~should~ be committed as you did, since what we had was clearly not right. Whatever happens next to solve the new problem w/ printing should be applied separately. Thanks! ' Best, -Ralph LaChance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 9235] - FOP Servlet Error
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=9235. 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=9235 FOP Servlet Error --- Additional Comments From [EMAIL PROTECTED] 2002-05-20 12:08 --- Is there any way that the code being used to interact with FOP could be posted here? It would be exceedingly helpful in finding out what's going on. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 9235] - FOP Servlet Error
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=9235. 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=9235 FOP Servlet Error --- Additional Comments From [EMAIL PROTECTED] 2002-05-20 12:52 --- /* * $Id: FopServlet.java,v 1.4.2.1 2002/03/01 12:44:39 chrisg Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.apache.fop.apps.Driver; import org.apache.fop.apps.Version; import org.apache.fop.apps.*; import org.apache.log.*; /** * 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=readme.fo * Example URL: http://servername/servlet/FopServlet? xml=data.xmlxsl=format.xsl * Compiling: you will need * - servlet_2_2.jar * - fop.jar * - sax api * - logkit jar * * Running: you will need in the WEB-INF/lib/ directory: * - fop.jar * - batik.jar * - avalon-framework-4.0.jar * - logkit-1.0.jar * - xalan-2.0.0.jar */ public class FopServlet extends HttpServlet { public static final String FO_REQUEST_PARAM = fo; public static final String XML_REQUEST_PARAM = xml; public static final String XSL_REQUEST_PARAM = xsl; Logger log = null; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException { if(log == null) { Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); log = hierarchy.getLoggerFor(fop); log.setPriority(Priority.DEBUG); } try { String foParam = request.getParameter(FO_REQUEST_PARAM); String xmlParam = request.getParameter(XML_REQUEST_PARAM); String xslParam = request.getParameter(XSL_REQUEST_PARAM); System.out.println(XML = ( + xmlParam + )); System.out.println(XSL = ( + xslParam + )); if (foParam != null) { FileInputStream file = new FileInputStream(foParam); renderFO(new InputSource(file), response); } else if((xmlParam != null) (xslParam != null)) { //InputHandler input = new XSLTInputHandler(new File (xmlParam), new File(xslParam)); System.out.println(Before renderXML); renderXML(new File(xmlParam), new File(xslParam), response); } else { PrintWriter out = response.getWriter(); out.println(htmlheadtitleError/title/head\n+ bodyh1FopServlet Error/h1h3No 'fo' + request param given./body/html); } } catch (ServletException ex) { throw ex; } catch (Exception ex) { throw new ServletException(ex); } } /** * renders an FO inputsource into a PDF file which is rendered * directly to the response object's OutputStream */ public void renderFO(InputSource foFile, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(application/pdf); //response.setContentType(text/html); Driver driver = new Driver(foFile, out); driver.setLogger(log); 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); } } public void renderXML(File inputXML, File inputXSL, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(application/pdf); InputHandler inputHandler = new XSLTInputHandler (inputXML, inputXSL); XMLReader parser = inputHandler.getParser(); Driver driver = new Driver(); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF);
DO NOT REPLY [Bug 9251] New: - Can't change the value of a variable
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=9251. 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=9251 Can't change the value of a variable Summary: Can't change the value of a variable Product: Fop Version: 0.20.3 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Enhancement Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I know the use of variable in FOP is not like in conventional programming. However, I have to use FOP as our report writer, we need to have the ability of holding value in variables test and modify them later. Currently I can only change the value of variable in for-each tag ON CONDITION that the variable tag is not enclosed in other tags. Is there any way we can change the varaible tag in if tag or choose tag? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 9251] - Can't change the value of a variable
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=9251. 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=9251 Can't change the value of a variable [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-05-20 15:17 --- This has absolutely nothing to do with FOP. Please realize that it's XSLT you're talking about. Have a look at the namespace prefixes in your stylesheet. You probably have xsl:* (XSLT) and fo:* (XSL:FO). for-each is part of XSLT, for example. It's probably best if you get a good book on XSLT and study how to tackle your problem in a different way. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
diffs for on-the-fly image support
Attached are gzipped diffs for the changes I made vs. the 0.20.3 release. I'm working on patches against CVS, but am pretty busy and wanted to get something out soonest. Essentially the patch includes: - support for callback-based, on-the-fly images (URLs like onthefly:SomeImage, you have to preregister the callback named SomeImage before running the FOP transformation) - a modified PDFGraphics2D called PDFStreamGraphics2D that does not use an intermediate byte buffer, but renders direct to a PDFStream - modified PDFStream so that it caches to tempfiles on disk rather than to heap - modified the drawImage portion of PDFStreamGraphics2D so that it only creates a new xObject for the image if it has never seen that image before, otherwise it reuses the reference The combination of these things took us from render times of up to 10 minutes and hundreds of megabytes of heap to render times of less than 10 seconds and less than 64MB of heap (the default max heap size). -- Paul Reavis [EMAIL PROTECTED] Design Lead Partner Software, Inc.http://www.partnersoft.com fop-diff.gz Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Error conversion XML to PDF: Exception in thread main java.lang.OutOfMemoryError
We create an XML file in ASCII of a size 1 MB (the file XML is an order of 300 rows), when I launch Fop-parser (fop0.20.3) to converte XML to PDF using XSL: the parser stops when it processes the 28 row with this message: Exception in thread main java.lang.OutOfMemoryError. My system is WinNt 4.0 Server, If you could help me solve the problem in some way, I will be greatful. With certain print jobs, FOP can consume a huge amount of memory. For example, I have an XML file of about 600KB that produces approximately 200 page of tabular data in small font sizes. Rendering this file with FOP is impossible with the SUN VM on Windows, because of its memory limit of 1GB. I use JRockit for his file. What you need to do relatively soon with FOP is increase the maximum heap size of your VM. The SUN VM has an upper limit of 256MB on Windows by default. Use the -Xmx commandline option to increase the max heap to 512MB. This should be ok for most files. Another point: Try to find out if the XSLT processor or FOP itself runs out of memory by doing the XSLT transformation separately - with stand-alone XALAN for example. Hope this helps, Arnd Beissner -- Cappelino Informationstechnologie GmbH Arnd Beißner Bahnhofstr. 3, 71063 Sindelfingen, Germany Email: [EMAIL PROTECTED] Phone: +49-7031-463458 Mobile: +49-173-3016917 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Japanese char support by FOP or not...
Anil Kumar Mishra wrote: Hi, I want to know that whether FOP support Japanese character. I tried to insert some Japanese character in fo file, but couldn't get the proper data(Japanese chars.) in output pdf file. Can anyone suggest me anything about this. FOP is able to process japanese characters. This doesn't mean you see glyphs for japanese characters in the PDF. In order to get this, you have to supply a font with appropriate glyphs to FOP. First, locate a font. If you have other applications on your platform which display japanese, look where the system stores fonts. Secont, you have to prepare a font metrics file and tell FOP to use it. This is described in the documentation in the FOP distribution: docs/html-docs/fonts.html. You are told to assign your font a name there. Third, construct a small FO file to test it. Declare some standard page master, and insert a block with japanese characters in the flow. Select the font you installed in step 2 using the font-family property (e.g. if you named it foo, declare font-family=foo on the block. Depending on your editor, you can insert the japanese characters directly into the FO file, or use XML character references. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
build changes
Ladies and gentlemen, boys and girls, What's the state of play now with the changes to the build system? Has the elimination of Xalan1 been completed? Who's doing what there? I am planning to throw a branch off HEAD to tinker with at least the versioning information for the build. I would like to try that before 0.20.4, if possible. What's the expectation with 0.20.4? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Identity crisis on cvs.apache.org?
Joerg, Thanks. It seems there were some configuration changes in openSSH between versions. Peter J.Pietschmann wrote: I don't see anything unusual (Win2K, cygwin OpenSSH). It could be that your ssh client has changed default settings. My ssh uses known_hosts for storing identities, perhaps known_hosts2 indicates SSH2 protocol or whatever. You could try to force your client to try SSH2 or SSH1 first, or copy known_hosts2 to known_hosts, or simply kill the file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]