Hi,

I want tank you about your reply!!
I have see your attach code but
it's work with a old version of FOP
and I think also with old api of SAX!
I give you the code of a servlet
that take xml, xsl and generate PDF with FOP 20.1


If you can revisite your code and
reply me !!! It's a nice think to help me!!!!!!

Tanks in advance!!!!

import javax.xml.transform.*;


TransformerFactory tfactory = TransformerFactory.newInstance();
/* Istantiate the transformer
StreamSource SstreamSourceXSL = new StreamSource(fileXSL);
Transformer transformer = tfactory.newTransformer(SstreamSourceXSL);

/* this method give me the dynamic XML file in format StreamSource
StreamSource SstreamSourceXML = getXMLStreamSource();

/* istantiate the object result
StringWriter SstringWriter = new StringWriter();
StreamResult SstreamResult = new StreamResult(SstringWriter);

/* xslt transformation
transformer.transform(SstreamSourceXML, SstreamResult);

ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
S = SstringWriter.toString();
ByteArrayInputStream str = new ByteArrayInputStream(S.getBytes());
/* FOP Transformation
Driver driver = new Driver(new InputSource(str), outPDF);
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
           






MEMMADI Said wrote:
[EMAIL PROTECTED]">
Hi,
What are changes in FOP API 0.20.1 exactly ?

Thanks in adavance ?

---- Messages d´origine ----
De: "Shkuro, Yuri" <[EMAIL PROTECTED]>
Date: vendredi 21 septembre 2001 16:57
Objet: RE: Generating PDF on Fly

Yes.  See attached JSP.  Without a parameter it reads
static XML file and displays it in HTML format, with
'fo' parameter it reads the .fo file and displays PDF,
and also has a link to display static XML as PDF. It's
easy to modify this to read external XML file and output
PDF. It used to work with FOP 0.19 - you may need to tweak
it a little for FOP 0.20 due to API changes (namely, comment
out driver.render() and driver.format()).

YS

-----Original Message-----
From: Semprini Davide [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:34 AM
To: fop-dev
Subject: Generating PDF on Fly


Hi,

I have a question:

Is possible to generate and VISUALIZE
with a common Browser with Acrobat Reader plug-in
a PDF using a JSP that take in input a Dynamic XML?

Tanks!

D.Semprini


< br>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]





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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
Part 1.1
Content-Type:
text/plain
Content-Encoding:
quoted-printable


Part 1.2
Content-Type:
text/plain


Part 1.3
Content-Type:
text/plain




Reply via email to