Re: rtf and number the items in an ordered list and openoffice

2006-06-29 Thread Stefan Ziel

Jeremias Maerki escreveu:

BTW, we're still looking for someone to start implementing
ODF. :-)


transformation from XSL:FO to ODF should be done without involving FOP 
(as those for WordML and HTML etc should) a simple XSLT stylesheet will 
do that job.


stefan ziel
clan informática do brasil ltda.
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache FOP 0.92 servlet driver problem

2006-06-28 Thread Stefan Ziel
 FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs while parsing the 
input

* file
*/
   protected byte[] renderFO(String fo)
   throws FOPException, TransformerException {

   //Setup source
   Source foSrc = convertString2Source(fo);

   //Setup the identity transformation
   Transformer transformer = this.transFactory.newTransformer();

   //Start transformation and rendering process
   return render(foSrc, transformer);
   }

   /**
* Renders an XML file into a PDF file by applying a stylesheet
* that converts the XML to XSL-FO. The PDF is written to a byte array
* that is returned as the method's result.
* @param xml the XML file
* @param xslt the XSLT file
* @return byte[] the rendered PDF file
* @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
   protected byte[] renderXML(String xml, String xslt)
   throws FOPException, TransformerException {

   //Setup sources
   Source xmlSrc = convertString2Source(xml);
   Source xsltSrc = convertString2Source(xslt);

   //Setup the XSL transformation
   Transformer transformer = this.transFactory.newTransformer(xsltSrc);

   //Start transformation and rendering process
   return render(xmlSrc, transformer);
   }

   /**
* Renders an input file (XML or XSL-FO) into a PDF file. It uses the 
JAXP
* transformer given to optionally transform the input document to 
XSL-FO.
* The transformer may be an identity transformer in which case the 
input

* must already be XSL-FO. The PDF is written to a byte array that is
* returned as the method's result.
* @param src Input XML or XSL-FO
* @param transformer Transformer to use for optional transformation
* @return byte[] the rendered PDF file
* @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
   protected byte[] render(Source src, Transformer transformer)
   throws FOPException, TransformerException {

   //Setup FOP
   Driver driver = new Driver();
   driver.setRenderer(Driver.RENDER_PDF);
   // driver.initialize();
 //Setup output
   ByteArrayOutputStream out = new ByteArrayOutputStream();
   driver.setOutputStream(out);

   //Make sure the XSL transformation's result is piped through to FOP
   Result res = new SAXResult(driver.getContentHandler());

   //Start the transformation and rendering process
   transformer.transform(src, res);

   //Return the result
   return out.toByteArray();
   }

}

Thanks! JV.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
stefan ziel
clan informática do brasil ltda.
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very large files to PDF

2006-06-05 Thread Stefan Ziel

Thanks andreas,

for twice the help:
- probably my out of memory problem was caused by a forward-reference.
- nevertheless i ever wanted to do processing in a more streaming 
fashion so the intermediate format should be my solution.


Best regards,
Stefan

Andreas L Delmelle escreveu:
FOP's Intermediate Format[*] might offer a solution here (?) Generate 
separate documents, and concatenate the area trees...? On another note: 
what exactly is the structure of your FO-source? Do you work with 
multiple, smaller page-sequences, or one huge flow containing 
everything? Do you use forward-references to the end of the document?



[*] see: http://xmlgraphics.apache.org/fop/0.92/intermediate.html



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Very large files to PDF

2006-06-02 Thread Stefan Ziel

hello,

for use in my report system i need to render reports with 30k pages into 
a single PDF file.


generating single XSL:FO files (size up to 2,3GB) causes OutOfMemory 
exception.


the report system is also able to generate the report in parts down to 
one page per XSL:FO file so i modified the PDFRenderer of 0.92Beta to 
render various sources into the same destination - and it works.

th price is a personalized version of FOP and i do not like this.

has anyone done anything like this before and found a more elegant 
solution ?


thanks for all help

stefan

--
stefan ziel
clan informática do brasil ltda.
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]