Subject: Re: [xsl] Fw: pdf file using xsl From: njain@xxxxxxx Date: Wed, 29 Mar 2006 11:17:17 -0500 |
James, Thanks for the response. My report size could grow from 1MB to 1GB, it entirely depends on the user's selection. So if decides to get a big report, say 500 MB, I'll have to allocate 5*500=2.5GB of RAM. I was wondering if it's a possibility to stream the data instead of holding in memory. Not sure if the XML structure is complex, but I need to use xsl:for-each-group to process the xml. Apart from this, I broke the process as follows: 1. Use xml and xsl to generate the FO object 2. Use FOP to generate the pdf from FO object created in step-1. I am kind of okay with step-1, since it takes about 1-2 mins to process. But step 2 takes a long time, and doesn't give any result. Following is the code used to generate the pdf. Driver driver = new Driver(); File outFile = new File("c:\\out.pdf"); File inputFile = new File("c:\\in.pdf"); // This is the FO Object which is created using the XSLT-2.0 processor(Saxon8) OutputStream fopout = new FileOutputStream(outFile); driver.setOutputStream(fopout); driver.setRenderer(Driver.RENDER_PDF); driver.setInputSource(new InputSource(new FileInputStream(inputFile))); driver.run(); --- Neeraj Jain 3M HIS, 8 King Road, Rockleigh NJ. 07647 USA Direct - 201 750 5931 njain@xxxxxxx neerajj@xxxxxxxxxxx James Neff <jneff@xxxxxxxxxxxxxxxx> 03/29/2006 10:59 AM Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx To xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc Subject Re: [xsl] Fw: pdf file using xsl Neeraj, Just real quick, try increasing the memory size much more. Depending on your XML structure (and how your processing it), the processor can use up to 10 times the input file size in memory to apply a stylesheet to it. Try setting it to 5-10 times what you have already. --James njain@xxxxxxx wrote: >Hello, >I tried this message earlier but it bounced back. I am new to this > I am working on an application which requires me to generate a pdf file >of up to 200MB size. I tried generating xml file and then apply xsl on it >with the Apache FOP driver. > >The result is "Out of Memory" error. I am not sure where the out of memory >error is coming, in FOP code or in Saxon8(I am using Saxon processor and >XSLT 2.0). > >Could anyone please help me out and let me know what could be wrong. > >PS: I have already tried to increase the JVM memory (-Xms218m -Xmx512m). > >Regards. >Neeraj
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fw: pdf file using xsl, James Neff | Thread | RE: [xsl] Fw: pdf file using xsl, Michael Kay |
Re: [xsl] XSL template "namespace" , Jon Gorman | Date | [xsl] Filtering out duplicates in c, Smith, Donald |
Month |