RE: FOP 0.94 : How to increase heap size
Hello Eric, Thanks for URL. I need to know how one can modify the FOP.BAT file. Is there any options thru which I can reset the heap size in FOP.BAT file. With Thanks! Newkid Amick, Eric wrote: http://xmlgraphics.apache.org/fop/0.94/running.html#memory Eric Amick Legislative Computer Systems Office of the Clerk -Original Message- From: Newkid [mailto:[EMAIL PROTECTED] Sent: Thursday, September 4, 2008 10:25 To: fop-users@xmlgraphics.apache.org Subject: FOP 0.94 : How to increase heap size Hi there! Could you please assist me how can I increase JVM heap size? Please let me know what I have to modify in FOP.BAT file so that it can take automatically whenever I run FOP from command prompt. When I am trying to convert XML to PDF using FOP, it's showing java.lang:OutofMemory Java heap space error. Would appreciate your prompt response! With Thanks! Newkid -- View this message in context: http://www.nabble.com/FOP-0.94-%3A-How-to-increase-heap-size-tp19309290p 19309290.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-%3A-How-to-increase-heap-size-tp19309290p19328398.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.94 : How to increase heap size
Hi there! Could you please assist me how can I increase JVM heap size? Please let me know what I have to modify in FOP.BAT file so that it can take automatically whenever I run FOP from command prompt. When I am trying to convert XML to PDF using FOP, it's showing java.lang:OutofMemory Java heap space error. Would appreciate your prompt response! With Thanks! Newkid -- View this message in context: http://www.nabble.com/FOP-0.94-%3A-How-to-increase-heap-size-tp19309290p19309290.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
org.apache.fop.fo.ValidationException: Error(Unknown location): fo:table-body is missing child elements.
$MainFOHandler.endElement(FOTreeBuilder.java:378) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:423) at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:263) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) As per the XSD, XML file is a valid file. Would appreciate your prompt reply! With Thanks! Newkid -- View this message in context: http://www.nabble.com/org.apache.fop.fo.ValidationException%3A-Error%28Unknown-location%29%3A-fo%3Atable-body-is-missing-child-elements.-tp16678820p16678820.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.xml.transform.TransformerException: java.lang.NullPointerException
Hello Jeremias, Are you saying that I should generate FO file from command line and share it with you? If not, can you please let me know from where I can get the FO file? I am using FOP 0.94 version. With Thanks! Newkid Jeremias Maerki-2 wrote: please just run the XSLT stage and take a look at the FO file that you generate with your stylesheet. -- View this message in context: http://www.nabble.com/javax.xml.transform.TransformerException%3A-java.lang.NullPointerException-tp16577116p16585362.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.xml.transform.TransformerException: java.lang.NullPointerException
Hello Jeremias, I have attached the FO file with this reply for your reference. I am unable to find out the cause of the exceptions as all look pretty fine to me. Please advice. With Thanks! Newkid Jeremias Maerki-2 wrote: Yes, that's what I'm saying. You can also do it in your application if you embedded FOP. From the command-line, you can do: fop -xml myxml.xml -xsl myxsl.xsl -foout out.fo This just runs the XSLT transformation. We usually don't like XML + XSLT because there are all sorts of things that can go wrong and it's more work to set it up in a test environment. If we just get the FO, we can more easily reproduce any problem (depending on the case, any images may also need to be made available). On the other hand, if you just run the XSLT stage you can verify yourself what your stylesheet produces and you can figure out what needs to be changed (This is certainly the first step before sending us the FO). HTH http://www.nabble.com/file/p16601756/TestOutput.fo TestOutput.fo -- View this message in context: http://www.nabble.com/javax.xml.transform.TransformerException%3A-java.lang.NullPointerException-tp16577116p16601756.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need immediate help.. FOP on Solaris Box
Hello Jeremias and Pietschmann, Thanks for your comments and suggestion. I guess, I didn't explain the concern correctly (may be due to my bad english...). Let me allow to explain it once again... I don't want to use FOP.sh ( for Solaris) et all in my Java pages. I wanted to convert the XML to PDF thru transformer and display the output in the browser. I don't want to save it on any physical location. My XML files is in the database as a CLOB object. As Jeremias has suggested, I have gone thru the embedding example and got to know many things. When I compiled the example and run as standalone it's working without an issue. But when I written the same code in JSP file, I got the exception: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable) pageContext.handlePageException((Throwable)__ee); Any advice! Hope, I am making sense this time.. With Thanks! Newkid -- View this message in context: http://www.nabble.com/Need-immediate-help..-FOP-on-Solaris-Box-tp16508410p16562784.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javax.xml.transform.TransformerException: java.lang.NullPointerException
Hi there! Can any one put some lights on the below mention concern? Apr 9, 2008 4:27:59 AM org.apache.fop.fo.FOTreeBuilder fatalError SEVERE: java.lang.NullPointerException javax.xml.transform.TransformerException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1276) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at XML2PDF.main(XML2PDF.java:130) Caused by: java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:264) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler.java:192) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1224) ... 4 more - java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:264) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler.java:192) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1224) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at XML2PDF.main(XML2PDF.java:130) I'm getting the same when I passed a Binarystream instead of XML file to XSLT transformation as input.. i.e. // Providing BinaryStream of data as input to XSLT transformation Source src = new StreamSource(BinaryStream); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res); Please advice. With Thanks! Newkid -- View this message in context: http://www.nabble.com/javax.xml.transform.TransformerException%3A-java.lang.NullPointerException-tp16577116p16577116.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - RTF Conversion on Solaris Box
Hello Jeremias, Thank you for your prompt support and suggestions. Thanks to all of you who has given their precious input and time for my concern. Warm Regards, Newkid Jeremias Maerki-2 wrote: Do you mean using the break-before and break-after properties? Looking at the source code, I don't think this has been wired in, yet. The RTF library can generate page breaks but the methods are never called from the RTFHandler class. On 28.03.2008 07:34:42 Newkid wrote: snip/ I am successfully able to create RTF file using FOP. The only issue which I have is insertion of page break at regular interval. How would I do it? Any idea? Please keep in mind that the content of the page is NOT same everytime. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16577281.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need immediate help.. FOP on Solaris Box
Hi there! Can any one let me know whether one can create an PDF file with the following options: a. Reading XML file from the stream, passing XSL which is stored in the webdirectory and storing it in some other directory? b. Reading XML from the database, passing XSL which is stored in the webdirectory and output the pdf as a stream? Please advice. Would appreciate your response! Newkid -- View this message in context: http://www.nabble.com/Need-immediate-help..-FOP-on-Solaris-Box-tp16508410p16508410.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - RTF Conversion on Solaris Box
Jeremias, Thanks for the wonderful hint! I am successfully able to create RTF file using FOP. The only issue which I have is insertion of page break at regular interval. How would I do it? Any idea? Please keep in mind that the content of the page is NOT same everytime. With Thanks! Newkid Jeremias Maerki-2 wrote: On 27.03.2008 08:28:03 Newkid wrote: Jeremias Maerki-2 wrote: You can try to write an additional stylesheet that converts the column-width properties as necessary. Or you can try to implement the missing functionality in RTFHandler.java in FOP though that may not be the easiest thing to do. Hello Jeremias, Thanks for the suggestion. Will the column width in % works? Like.. fo:table-column column-width=60% column-number=1/ Probably not as the problem is pretty much the same as with proportional-column-width(): At the moment, the RTFHandler doesn't keep track at the various levels how much space there is available for the table so it can build a proper percentage context. Or I have to hard code the coulmn width like fo:table-column column-width=250 column-number=1/ Please add a length unit (cm, in etc.). Secondly, have you heard about XFC? What is your take about it? Sure, I know about XFC. Its RTF output support is certainly better than FOP's. But then, FOP's free, the source code available and everyone can help improve the code. Hint, hint! With Thanks! NewKid -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16323311.html Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16346615.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - RTF Conversion on Solaris Box
Hello Matt, Thank you so much for your support! I am successfully able to convert XML into PDF files. I have cross checked several times and on each occasion I got the correct input. Now, I have to convert the XML into RTF by creating FO file. All( FO and RTF) files are getting created without an issue using fop.sh but when I open the newly created RTF file, the content of the pages are getting compressed. I can only see the heading in that document. Please advice. For your convenience, I have enclosed the created file with this reply. Once again, thank you all for your valuable time and support. With Thanks! Newkid http://www.nabble.com/file/p16297931/abc.rtf abc.rtf Matt Healy wrote: On Thu, 20 Mar 2008, J.Pietschmann wrote: Matt Healy wrote: I went back and checked the script, and found that IFS is being set just to the newline character, and does not include spaces. This is intentional: it avoids splitting directorie names which contain spaces, which is rather common now especially on Windows. How about this as an alternative, then: simply move the assignment to (and export of) IFS to a point immediately *after* the evaluation of the command-line arguments. In this way, the loop will appropriately differentiate between the arguments, rather than failing to break the evaluation of '$@' on the spaces between quoted values. In other words, rewrite: export IFS= for arg in $@ ; do . . . . done as: for arg in $@ ; do . . . . done export IFS= The content within the for loop appears to be space-friendly, since it's using escaped double-quotes to build up the content of the fop_exec_args variable from the values of $arg, and no other potential file names are being used in the loop. I think this should maintain the space-friendly nature of all of the subsquent code, while letting the for loop parse the data in a way that is compliant with Bourne shell under Solaris (and possibly other platforms) where the current code does not. (Hopefully I haven't missed anything ;-) -mjh -- Matthew J. Healy Computer Science Information Technology Departments Golisano College of Computing and Information Sciences, RIT mailto:[EMAIL PROTECTED] http://www.cs.rit.edu/~mjh Voice: (585) 248-3425 J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16297931.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - RTF Conversion on Solaris Box
Hello Jeremias, Thank you for the prompt response! You are correct on your stand about the column width. Without knowing how you specified them XSL-FO I'd guess that you need to specify the column-widths using explicit lengths instead of the proportional-columns-widths() function. I have created the .fo file and passing the .fo file to fop to create an RTF file. Please advice what to do to get rid of this issue. Are you saying that I have to manually modified the .fo file and specify the column widths instead of proportional-columns-widths. Please correct me if am wrong! With Thanks! Newkid Jeremias Maerki-2 wrote: I assume you're talking about the table columns being too narrow. Without knowing how you specified them XSL-FO I'd guess that you need to specify the column-widths using explicit lengths instead of the proportional-columns-widths() function. This function is currently not supported for RTF output. Please see also the notes here: http://xmlgraphics.apache.org/fop/stable/output.html#rtf On 26.03.2008 10:32:08 Newkid wrote: Hello Matt, Thank you so much for your support! I am successfully able to convert XML into PDF files. I have cross checked several times and on each occasion I got the correct input. Now, I have to convert the XML into RTF by creating FO file. All( FO and RTF) files are getting created without an issue using fop.sh but when I open the newly created RTF file, the content of the pages are getting compressed. I can only see the heading in that document. Please advice. For your convenience, I have enclosed the created file with this reply. Once again, thank you all for your valuable time and support. With Thanks! Newkid http://www.nabble.com/file/p16297931/abc.rtf abc.rtf snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16299634.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - RTF Conversion on Solaris Box
Hello Jeremias, I can't change the stylesheet as it standard and secondly I am using the same to convert XML to PDF. Can we do anything else? Is there any alternative? Yes and no. Yes, you have to use column-width=2cm instead of column-width=proportional-column-width(1), for examples. And no, you don't manually modify your .fo file, you should change your XSLT stylesheet to use absolute lengths (cm, inches...). I assume you're talking about the table columns being too narrow. With Thanks! NewKid -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16300786.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.94 bin - Severe Exceptions on Solaris Box
Dear All, On the top, thank you so much for the prompt response! Let me allow to say what I've done so far.. I downloaded the fop-0.94-bin.tar and unzipped it in a windows machine. Then I moved the unzipped files to Solaris box inside folder /var/fop. Under it, when I tried to generate a test pdf by issuing the following command: fop -xml test.xml -xsl test.xsl -pdf test.pdf I got the first error -bash: fop.sh: command not found. I have set the resepective PATH and it's gone but I got the second error like No such file or directory. After fixing the second issues, I got the error which was related to FOP.sh i.e. IFS=^J is not an identifier. After doing some R N D, I got rid of the issue by changing the line 25 of fop.sh to: IFS= export IFS At that time, I was successfully able to execute the fop.sh but NOT with parameter. In other approach of resolving the issue, I have taken the source file(fop.sh) and convert it using dos2unix command by hoping that it will do the magic as suggested in one of the thread. But all vain.. Please advice, what I have to do to get rid of it? Once again, thank you so much for your time and valuable comments! With Thanks! Newkid Matt Healy wrote: On Thu, 20 Mar 2008, J.Pietschmann wrote: Matt Healy wrote: I went back and checked the script, and found that IFS is being set just to the newline character, and does not include spaces. This is intentional: it avoids splitting directorie names which contain spaces, which is rather common now especially on Windows. How about this as an alternative, then: simply move the assignment to (and export of) IFS to a point immediately *after* the evaluation of the command-line arguments. In this way, the loop will appropriately differentiate between the arguments, rather than failing to break the evaluation of '$@' on the spaces between quoted values. In other words, rewrite: export IFS= for arg in $@ ; do . . . . done as: for arg in $@ ; do . . . . done export IFS= The content within the for loop appears to be space-friendly, since it's using escaped double-quotes to build up the content of the fop_exec_args variable from the values of $arg, and no other potential file names are being used in the loop. I think this should maintain the space-friendly nature of all of the subsquent code, while letting the for loop parse the data in a way that is compliant with Bourne shell under Solaris (and possibly other platforms) where the current code does not. (Hopefully I haven't missed anything ;-) -mjh -- Matthew J. Healy Computer Science Information Technology Departments Golisano College of Computing and Information Sciences, RIT mailto:[EMAIL PROTECTED] http://www.cs.rit.edu/~mjh Voice: (585) 248-3425 J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16194929.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.94 bin - Severe Exceptions on Solaris Box
on SOLARIS, I received the above mentioned error. Any tip would be deeply appreciated.! Newkid -- View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16175972.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]