create pdf from DOM
Brought to you by:
lauerc
I want to create a pdf-file from a Document Object Model (DOM). Is there any example available? There is no variant of DocumentPrinter with a parameter DOM and I have no idea what XSL to provide to the DocumentTransformHelper???
Please help.
thx Hajo
btw: I have report definition files in XML format. I read them into a DOM-tree which is then parsed. All occurrences of e.g. "hal:sql" access a database and apply a result set bean to the next nodes which can use these results. and some more ...
If you are interested in integrating this into UJAC, please let me know.
We've done something similar. We used Apache XmlBeans for parsing the XML content. XmlBeans can parse a DOM-tree as well. Using XmlBeans, the XML content is transformed to JavaBean compatible classes, so you can use it with UJAC for generate PDF. In the template, you can access az XML element like this: ${rootNode.child1.child2}