You are not alone Jim,

I have exactly the same need than you (but I also want the XSL in a string
buffer).  I'm waiting impatiently the answer of your question.
Unfortunetly, I don't have any hint to provide.

Marc

-----Original Message-----
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 11:52 AM
To: [EMAIL PROTECTED]
Subject: RE: Need Working Sample


Sorry, but this does not work for two reasons.

1. The XML does NOT exist on disk!  It is in memory only, and writing it to
disk is NOT an option.

2. This is a high traffic web application.  Starting a new JVM to process
FOP is too costly.

There must be a way for this FOP thing to read raw (data only) XML (in
memory) apply an XSL style sheet to add the FO tags, then format the PDF and
return it to a browser.  I can't believe I am the first person in the word
to need to do this.

If I seem upset, I'm sorry.  But I have been fighting with FOP since last
week to get it to do this.  FOP works great for taking FO files and
converting them to PDF files, but that's not what I have to do.  I have a
deadline to meet and I have wasted a week trying to get FOP to work.

Jim

-----Original Message-----
From: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Need Working Sample


Hi Jim,
            I have exactly the same problem, and I've just found a non
elegant, working solution:

I generate my XML file, and then call the command line Fop from within my
servlet:

Runtime.getRuntime().exec(new String[]{"java.exe", "-cp",
"c:\\fop\\Fop-0.18.1-DEV\\fop.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\w3c.jar;c:\\
fop\\Fop-0.18.1-DEV\\lib\\xalan-2.0.0.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\xerc
es-1.2.3.jar;c:\\fop\\Fop-0.18.1-DEV\\lib\\jimi-1.0.jar",
"org.apache.fop.apps.Fop", "-xml" , "c:\\prueba.xml", "-xsl" ,
"c:\\prueba.xsl", "-pdf" , "c:\\prueba.pdf"});

As I said, it is NOT elegant, but after sweating for days with problems of
all type doing the elegant thing, I get my beautiful PDF on disk.

Of course you should adapt the names of trhe directories  and the xml and
xsl files.

Cheers,
                       Gustavo

PS: if someone has an elegant solution I would be happy to use it too.

>  -----Message d'origine-----
> De :  Jim Urban [mailto:[EMAIL PROTECTED]]
> Envoyé :      vendredi, 6. juillet 2001 17:09
> À :   [EMAIL PROTECTED]
> Objet :       Need Working Sample
>
> Hi, I am new to FOP.  I have a servlet which dynamically generates XML.  I
> need to apply an XSL stylesheet containing FO tags to generate a FO
> version of the XML and then I need to run this FO version of the XML
> through FOP (or Driver) so the servlet can return a dynamically created
> PDF to the browser.  Does anyone have a working example of how to do this?
> Only the XSL style sheet containing the FO tags used in the initial
> transform will be on disk.  Please help, I have to get this working.
>
> Thanks,
>
> Jim Urban
> Product Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL  60143
> Voice:  (630) 250-3045 x2164
> Fax:  (630) 250-3046
>
> << Fichier: ATT14204.txt>>

---------------------------------------------------------------------
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]

Reply via email to