The SAX processing model (instead of constructing DOM trees to subsequently feed FOP) would probably be much faster for you. No JSP needed for this. I would take a look at Jeremias' ExampleObj2PDF[1] and corresponding model[2] to get an idea of the process. I've been using this method at work for some time now and it has been working quite well for me.

Glen

[1] http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java?rev=332791&view=markup

[2]
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/model/


Geoffrey De Smet wrote:

I've worked with both FOP and JasperReports
and I really prefer the FO format over jasperreport's custom format.
But Jasperreports allows to use Java/POJO based transformations, so I am wondering if this is possible in FOP.

Basically the idea is to replace:
- generate XML based on POJO
- transform XML with XSL to FO
- feed FOP the FO
with
- supply POJO to "JSP without http" which generates FO
- feed FOP the FO

Does anyone know an (open source?) library which can do something like:

class Person {
  private String firstName;
  private String lastName;
  // getters and setters
}

...
<jspWithoutHttp:valueObject name="personList" class="java.util.List<Person>"/>
...
<% for (Person person : personList) { %>
  <fo:block>
    <%= person.getFirstName%>
  </fo:block>
  <fo:block>
    <%= person.getLastName%>
  </fo:block>
<% } %>
...

This should be usable in fat clients, webclients, ...: it is not bound to the HTTP protocol.



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

Reply via email to