Just to follow up on this...

I ended up using iText which is a Java library. Filling in the form
fields was a piece of cake!
http://www.lowagie.com/iText/

After writing my own wrapper to iText I then connected it to Ruby using
RJB
http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge
This bridge was also very easy to configure and use.