I'm fairly new to Web programming so am looking for some guidance. I want to return Invoices as PDF so customers can choose to print or save them in an identical in layout to our normal, printed documents.

At this point, I have written a Web Service which creates the Invoice in a struct and returns it in response to a SOAP call as XMl. I have also developed an XSLT stylesheet which transforms the XML into XML-FO which can then be converted to PDF by using FOP0.95. The XML returned for a large invoice is about 400Kb.

The Transform program (Altova XML2011) is available with COM, java or .NET intefaces or can be run from the command line.

FOP0.95 is a Java application which can be called from Java, built into servlets or run from the command line.

I have no Java experience but do have access to a java programmer while my knowledge of ASP is a bit rusty but I am willing to brush up on it.

My questions are these:

1. Is there a better way to produce PDF than the path I've chosen?

if not:
2. Clearly I have to have XML to start with. a SOAP call will do this for me automatically but I will then need to handle it with either a COM or Java application followed by a Java application. Would it be best to have a java application (servlet?) written so the whole process including the SOAP call would be handled by Java?

3. If instead I used cClientWebService I presume I would need to retrieve the Invoice as a struct and convert it to XML using the ValueTreeFunction but what would happen next?

Speed is something of an issue since the large Invoice mentioned above takes 14 seconds to create in the web service and the combined conversion resulting in PDF takes a further 12 seconds using the command line interfaces.

I would be grateful for any suggestions as to the best way to proceed.

Ian