delbd ha scritto:
Hi, here we use fop to generate pdf from a set of datas. pdf is generated
directly inside our content management. The key to doing this is:
Driver d = new Driver();
ByteArrayOutputStream out = new ByteArrayOutputStream();
d.setOutputStream(out);
The rest is as documented on FOP website (create the xslt handler and the xml
input source then call transform).
May be you could create a small java app around fop which take as parameter
the url of an xslt, as stdin the xml of data and puts the result in stdout
and then call it from PHP.
Btw xsl-fo is xsl, so you don't have to create an xsl-fo from your datas, the
xsl-fo can contains the classical <match> and <select> values with no
problem.
This can be done like this:
...
Source xslt = new StreamSource(r,sourceUri);
/*You can use any other source, see javadoc of DOM*/
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer(xslt);
Result res = new SAXResult(d.getContentHandler());
transformer.transform(data, res);
...
Le Mardi 14 Juin 2005 09:07, Francesco Pirani a �crit :
Hi,
i've a question...i'm using FOP to trasform an xml in pdf...it works
correctly.
Now what i want to do is a PHP script witch allow me to select a type
(html, xhtml, pdf, svg, rtf, ecc...) and so to trasform my xml in the
selected type...the problem is when i've to trasform in pdf...FOP works
in this way: xml is trasformed by xslt in xsl-fo...i've to store the
xsl-fo in my disc...(and i want to avoid this)...fop takes the xsl-fo in
input and it makes a pdf in output...also the pdf is stored in my
disc...is it possible to use FOP avoiding the storage, maybe with a dump
in memory?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ok, thanks...now i try..
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]