I have a collection of objects which i want to print to pdf in a templated format.
I have tried to print the collection as PDF using the code below, but i do not see any text rendered in PDF after file is created.

What you have is not a proper FO file. <xsl:for-each> is XSLT, not XSL-FO.
–
mzjnJun 11 '13 at 11:29

I want to write a program without using xsl tags and I have read that variable can be read by apending $ before them in fo files...I have tried setting the collection(ie., Arraylist in setparameter of transformer) but am not able to read that in FO.Can you please guide me how to read in FO syntax...
–
juanJun 12 '13 at 5:24

Run the code on your machine and have a look at what's written to the second page: It's just gibberish, since the stylesheet and transformer cannot process an array of int. If you really need to process data from a custom class, I'd suggest passing the values you really need to the stylesheet as (concatenated) strings.