posted 13 years ago
Thanks for the reponse. I'll explain the situation a little more elaborately.
There are multiple xmls. each xml corresponds to a single document. All the xmls are stored in a list. FOllowing is what happens in the code
loop through the list
select the xml from the list
using xslt convert it to xsl-fo format
feed as input the converted xml to fo processor
// the result of fo processing is present in the byteArrayOutputStream
loop again
'write' the stream's content to response
With the above code, all the conversions are lost except for the one which was performed last. So when I perform the 'write' operation, only the last document is present in the resulting pdf. My guess is that since I'm passing the same byteArrayOutputStream object in every conversion, the fo processor is wiping the stream off clean and then is putting the new conversion.
I've tried merging the xmls and putting them in the fo processor, but received a malformed xml error.
So, is there any way wherein multiple xmls can be converted to a single pdf. Also, does fop have this capability or is there any other approach?
Do let me know in case the above information is not helpful.